FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » implode() order?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
implode() order? [message #176297] Mon, 19 December 2011 20:09
Mike is currently offline  Mike
Messages: 18
Registered: December 2010
Karma:
Junior Member
How can I define the order that an array implodes? See code sample below:

<?php
$toImplode = Array(
1 => "Second",
0 => "First",
2 => "Third"
);

$finalString = implode(" - ", $toImplode);

echo "<p>" . $finalString . "</p>";

/* Results as "Second - First - Third"
* But I need it to be "First - Second - Third"
*/
?>
[Message index]
 
Read Message
Previous Topic: Reading recommendation for PHP- OOP
Next Topic: implode() order?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 05:42:34 GMT 2024

Total time taken to generate the page: 0.04057 seconds