Re: html() does not work

56 views
Skip to first unread message

Martin Kaspar

unread,
Sep 6, 2011, 9:42:33 AM9/6/11
to phpq...@googlegroups.com
dunno

On Sun, Sep 4, 2011 at 11:28 PM, cusaro <cus...@gmail.com> wrote:
hello,

i can't figure out why my code ist not working:

foreach(pq('#content p')->contents() as $text) {
       $content = pq($text)->html();
       $content = str_replace('test','<b>test</b>',$content);
       pq($text)->html($content); <- this line dosen't work
}

with foreach(pq('#content')->contents() as $text) { it works but i
need the p to select.

thank you.

--
You received this message because you are subscribed to the Google Groups "phpQuery" group.
To post to this group, send email to phpq...@googlegroups.com.
To unsubscribe from this group, send email to phpquery+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/phpquery?hl=en.


Reply all
Reply to author
Forward
0 new messages