phpretard Posted January 26, 2008 Share Posted January 26, 2008 I serialized input from a form, inserted the serialized data, unserialized the data and echoed it. It echoed an array and I dont know how to seperate the information so I can use it. I need to output the "add_player.php" part of this like so -<a href='http://www.website.com/add_player.php'> array(4) { [0]=> string(14) "add_player.php" [1]=> string( "rand.php" [2]=> string(10) "roster.php" [3]=> string( "menu.php" } Array Can someone help seperate this stuff please? Link to comment https://forums.phpfreaks.com/topic/87942-solved-array-serialize/ Share on other sites More sharing options...
phpretard Posted January 26, 2008 Author Share Posted January 26, 2008 Often times I do not supply the info needed to help you help me. Is this enough info? Link to comment https://forums.phpfreaks.com/topic/87942-solved-array-serialize/#findComment-449932 Share on other sites More sharing options...
phpretard Posted January 26, 2008 Author Share Posted January 26, 2008 After messing around I echo -- string(14) "add_player.php" -- Can someone help get rid of the - string(14) - and both quotes Link to comment https://forums.phpfreaks.com/topic/87942-solved-array-serialize/#findComment-449949 Share on other sites More sharing options...
kenrbnsn Posted January 26, 2008 Share Posted January 26, 2008 Please tell us how you searialized the information and unserialized it. Posting some of your code would help. Ken Link to comment https://forums.phpfreaks.com/topic/87942-solved-array-serialize/#findComment-449951 Share on other sites More sharing options...
phpretard Posted January 26, 2008 Author Share Posted January 26, 2008 This id how I serialized it: $url=serialize($_POST['url']); I unserialized like this while($row = mysql_fetch_array($result)) { $url=unserialize($row['url']); var_dump($url[0]); } Link to comment https://forums.phpfreaks.com/topic/87942-solved-array-serialize/#findComment-449955 Share on other sites More sharing options...
phpretard Posted January 26, 2008 Author Share Posted January 26, 2008 Here is the form imput <input type='checkbox' id=url name='url[]' value='$url' /> <input type=text id=input name=name value='$name' readonly><br> Link to comment https://forums.phpfreaks.com/topic/87942-solved-array-serialize/#findComment-449957 Share on other sites More sharing options...
phpretard Posted January 26, 2008 Author Share Posted January 26, 2008 Do you need more code than this? Link to comment https://forums.phpfreaks.com/topic/87942-solved-array-serialize/#findComment-449964 Share on other sites More sharing options...
kenrbnsn Posted January 26, 2008 Share Posted January 26, 2008 Please show all the code for the form. Before you do the serialize, do <?php echo '<pre>' . print_r($_POST['url'],true) . '</pre>'; ?> Ken Link to comment https://forums.phpfreaks.com/topic/87942-solved-array-serialize/#findComment-449972 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.