user4fun Posted March 8, 2009 Share Posted March 8, 2009 Hos can I split $var_string1 to$VarA and $VarB.$VarB is the last 5 chracters in $var_string and every thing else would be $VarA Link to comment Share on other sites More sharing options...
boen_robot Posted March 8, 2009 Share Posted March 8, 2009 You can use the substr() function, and it's negative effects to be more precise.For example: $VarB = substr($var_string, -5);//Gets the last 5 characters from $var_string$VarA = substr($var_string, 0, -5);//Gets all characters before the last 5 characters from $var_string Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.