shaunie Posted February 25, 2013 Share Posted February 25, 2013 Hi, I have an array and I'm not sure how to get the string value back from it: array(1) { [0]=> string(30) "1st Sep, 2012 - 31st Aug, 2013" } I need to get 1st Sep, 2012 - 31st Aug, 2013 into a variable. Link to comment https://forums.phpfreaks.com/topic/274924-getting-string-from-array/ Share on other sites More sharing options...
AyKay47 Posted February 25, 2013 Share Posted February 25, 2013 $arr = array("1st Sep, 2012 - 31st Aug, 2013") echo $arr[0]; arrays Link to comment https://forums.phpfreaks.com/topic/274924-getting-string-from-array/#findComment-1414849 Share on other sites More sharing options...
shaunie Posted February 25, 2013 Author Share Posted February 25, 2013 Thanks for your reply but if I do that I get: string(30) "1st Sep, 2012 - 31st Aug, 2013" I need: 1st Sep, 2012 - 31st Aug, 2013 Link to comment https://forums.phpfreaks.com/topic/274924-getting-string-from-array/#findComment-1414855 Share on other sites More sharing options...
Jessica Posted February 25, 2013 Share Posted February 25, 2013 and the problem IS? Link to comment https://forums.phpfreaks.com/topic/274924-getting-string-from-array/#findComment-1414860 Share on other sites More sharing options...
Jessica Posted February 25, 2013 Share Posted February 25, 2013 Wait are you saying you actually stored the results of a var_dump into an array? Why on earth? Go back to where that got all messed up and fix it there. Link to comment https://forums.phpfreaks.com/topic/274924-getting-string-from-array/#findComment-1414861 Share on other sites More sharing options...
AyKay47 Posted February 25, 2013 Share Posted February 25, 2013 Sounds like you need a little more help then just outputting an array index, please post the relevant code so we can help you further. Link to comment https://forums.phpfreaks.com/topic/274924-getting-string-from-array/#findComment-1414868 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.