I am just starting out in php.
I have a html form which I have grabbed the values out of.
I want to insert some values into text, however I wish to remove the spaces.
I am trying to use the str_replace but cannot get it to work.
It gets more complex, as I only want to remove the spaces in certain parts of the text.
Here is what I originally did.
This is the value that I am using : <?= $form['text'] ?>
I gave the value another name : <?= $form['text'] = $newtext ?>
I then used the string_replace thing : <?= $newtext = str_replace(" ","",$newtext); ?>
And then to show the text <?= echo $newtext; ?>
I am sure there is something easy that I am doing wrong.
Please help.