Re: break up variable and put each element in an array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






On Tue, August 8, 2006 8:02 am, Reinhart Viane wrote:
> A. I have a page on which people can supply dates in a text area.
> Dates are
> entered like this:
> 3/01/2005
> 29/12/2005
> 2/01/2006
> 20/02/2006
> 28/12/2006
> 1/01/2007
> 15/02/2007
>
> B. Now I need this Post element to be broken into pieces (per date)
> and each
> of those pieces should be put into a text so the outcome (echo on
> screen)
> would be like this:
> Date=3/01/2005
> Date=29/12/2005
> Date=2/01/2006
> Date=20/02/2006
> Date=28/12/2006
> Date=1/01/2007
> Date=15/02/2007

$dates = "Date=" . implode("\nDate=", explode("\n", $dates);

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux