Yes, I guess it would be $post[Post]['body']

Le vendredi 27 avril 2012 09:45:27 UTC+2, Mike Griffin a écrit :
>
> On Thu, Apr 26, 2012 at 17:53, JonStark  wrote: 
> > I'm currently trying to get the first link of a post for a specific post 
> > format, but preg_match needs two parameters and I can't find the 
> second... 
> > Here is my code : 
>
> The second parameter is the thing you want to find a match in, I think 
> they call it the haystack in the documentation. 
>
>
> > } else if (($post['Post']['format']) == 'link') { 
> > if (preg_match('/<a\s[^>]*?href=[\'"](.+?)[\'"]/is')a) { 
> > return $firstLink; 
> > } else { 
> > return $articleLink; 
> > } 
> > 
> > (...) 
> > 
> > How can I make this work in my view ? Thanks a lot. 
>
> What are you matching against? Is it something in the $post variable? 
>
> Mike. 
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to