Wednesday, July 28, 2010

Re: Invalid argument supplied for foreach() , when i use sessions

On Wed, Jul 28, 2010 at 2:33 PM, Tomfox Wiranata
<tomfox.wiranata@gmail.com> wrote:
> cricket..thx for your help...the loop was empty as far as i could
> tell...works now :)
>
>  i appreciate it.......
>
> but i have sth else making me nuts.
>
> when i echo data, it automatically makes a break with <p> and prints
> the text into the next line...so my echo code is this in html:
> <span class="data"><p>desc</p></span>
>
> how can i make this <p> go away? cause my text wont appear where i
> want it to be...i wanna print text without making a break

You must already have the text wrapped in P tags. Maybe whatever
you're using to enter the text into the DB is adding them. If you
debug the data, you likely won't see the <p></p> because the browser
will interpret them. Look at the data directly through a terminal
session or do something like (in the controller):

header('Content-type: text/plain');
die(debug($data));

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

No comments: