Re: Strange string stuff -- maybe everything is ending...

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

 



On 22.12.2012 00:31, Bastien wrote:

On 2012-12-21, at 5:05 PM, Ken Robinson <kenrbnsn@xxxxxxxxx> wrote:

A much easier way to do this would be to use a temporary array and then explode:

$tmp = array();
        while($row = mysql_fetch_array($result)) // pulling stuff from a database
                {
                $tmp[] = $row['category'];
                }

            $topic = explode('~',$tmp); // put the delimiter between each entry
        echo($topic);   // this result is used in an AJAX script



Shouldn't that be implode to convert the array to string with the delimiter?


Bastien


Yes, it should be implode().

Stefan

--
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