I have the following String:
$link = '13542345/essa_e_minhastring';
How do I get only the value up to the "/" bar and ignore the rest?
I'd like to assign this value to a variable.
I'm using the following code, but it just breaks the string ... and does not separate into a variable as I need:
$cod = str_replace("/","<br>",$link);
echo $cod;
The result is:
13542345
esse_e_minhastring
I need it to be just:
13542345