Jump to content

[SOLVED] Dropping first symbol or character from a variable return


jaxdevil

Recommended Posts

Thanks. That is definitely more elegant than what I came up with in the interim...

 

<?php
$string = $rate;
$new_string = preg_replace("/[^a-zA-Z0-9s]/", "", $string);
$newstring = substr($new_string, 0, -2);
echo $newstring
?>

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.