[clug-progsig] php new line not working
Nick Wiltshire
nick at customdesigns.ca
Mon Feb 5 14:56:19 PST 2007
In php, things in single quotes are literal strings. Use "" instead of ''
Nick
On Monday 05 February 2007 15:51, joshua gatcke wrote:
> Hello All,
>
> I am trying to create a newline in the source of an xml file I am
> creating with PHP, however, "\n" is being output. Here is the code.
> Not sure why this is happening.
>
> Thanks in advance,
>
> <?php echo '</?xml version="1.0" encoding="iso-8859-1"/?>'; ?>
>
> <?php foreach($vars as $post): ?>
> <post>
> <?php foreach($post as $key => $value):?>
> <?php echo '<'.$key.'>'.$value.'</'.$key.'>\n';?>
> <?php endforeach;?>
> </post>
> <?php endforeach;?>
>
> <pre>
> <?php //print_r($data);?>
> </pre>
>
>
>
>
>
> _______________________________________________
> clug-progsig mailing list
> clug-progsig at clug.ca
> http://clug.ca/mailman/listinfo/clug-progsig_clug.ca
More information about the clug-progsig
mailing list