Re: Embedding foreach loops
| From: | Allen McCabe | Date: | Mon, 10 Aug 2009 23:11:25 +0000 |
| Subject: | Re: Embedding foreach loops | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296582@lists.php.net to get a copy of this message | ||
I am using the print function to display my html. I cannot get the line
return ( \n ) character to actually push the html onto the next line, it
just gets displayed instead. Should I be using echo?
On Mon, Aug 10, 2009 at 3:41 PM, John Butler
<govinda.webdnatalk@gmail.com>wrote:
>
> I did this, and got my arrays dumped (on one line). After adding line
>> returns, here is a snippet:
>>
>
>
> it looks OK. Note that you can see (copy/paste) that array which you just
> dumped, much better, if you view the source code of the html page. OR you
> can use <pre> to make that format persist thru' to what you see without
> viewing the source., Like so:
>
> echo "<hr /><pre>\n";
> var_dump($theArray);
> echo "</pre>\n";
> echo "<hr />\n";
>
> My brain is so full of my own work.. and I am newbie compared to most
> lurking here.. but I am sure we'll figure out your issue if we work on it
> systematically. OK, your OP just said, "..I can't seem to get my foreach
> loops to work.." , but you never said exactly what is the problem. Break
> the problem down to the smallest thing that you can find that is not
> behaving as you expect it to, and explain THAT to me. We'll do this step
> by step.
>
> -John
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>