nezbie Posted December 21, 2006 Share Posted December 21, 2006 Let's say i have lots of inputfields that have values where doublequotes are used, like: <input type="text" value="\"myvalue\"" name="mytextfield[0][0]"> ( used addslashes to prevent value=""myvalue""> )In page, this displays correctly, also in sourcecodeBut when posting, $_POST array shows only \\ or " or \ where there should be a "myvalue". I've tried to search the forums and google / manual but no matter what i do the post array returns one of the following useless values described above.. What am I doing wrong with this? :'( Link to comment https://forums.phpfreaks.com/topic/31469-doublequotes-in-array-values/ Share on other sites More sharing options...
Round Posted December 21, 2006 Share Posted December 21, 2006 Do you mean when you retrieve variables eg $variable = $_POST['variable']?if not can you be clearer? Link to comment https://forums.phpfreaks.com/topic/31469-doublequotes-in-array-values/#findComment-145763 Share on other sites More sharing options...
nezbie Posted December 21, 2006 Author Share Posted December 21, 2006 I use it for:structure of textfields = mytextfield[rowNR][colNR] (has a value), like mytextfield[0][5] = value (can also be "value")all the data are read and written to a [b]textfile[/b][b]// save post as CSVforeach ($_POST['mytextfield'] as $key=>$value) { $parsedData .= implode(';', $value) . "\r\n";}[/b]so when foreaching an array, or otherwise handling arraysbut I print out $_POST before any action after I have submitted the form, the "errorneus data" is visible there already. So in the foreach loop, the $value could be anything like 1234 or "1234" or Jim or "Jim" Link to comment https://forums.phpfreaks.com/topic/31469-doublequotes-in-array-values/#findComment-145770 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.