Jump to content

[SOLVED] Reverse string bits?


AtomicRax

Recommended Posts

I'm trying to reverse a string, but I don't want it completely backwards...

 

I have:

 

$str = "10,8,6,4,2";

 

It is not an array, and can't be an array. It's simply a string with commas.

 

I want to reverse it so it says "2,4,6,8,10". BUT, if I do a regular string reverse, it'll say "2,4,6,8,01" That's not what I'm looking for... How can I do this?

Link to comment
https://forums.phpfreaks.com/topic/161563-solved-reverse-string-bits/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.