Jump to content

variable with commas


Recommended Posts



I am defining a variable that contains commas e.g. "Manchester, United Kingdom" in the following way




However when I echo the variable, it only shows "Manchester," and ignores anything after the comma, how can I correct this?


Probable really simple.

Link to comment
Share on other sites

Are you sure $_POST['select'] contains what you think it does?


The behaviour you're describing isn't possible on it's own.



$_POST['select'] = 'Manchester, United Kingdom';

$location = $_POST['select'];

echo $location;
// outputs Manchester, United Kingdom


Link to comment
Share on other sites


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.