dmccabe Posted December 19, 2008 Share Posted December 19, 2008 As I understand it $_POST is an array of the values entered in a form. What I want to know is how would I search the $_POST array for the occurrence of a word? While I have go to grips with most things, I am never 100% sure what I am doing with arrays. Link to comment https://forums.phpfreaks.com/topic/137682-solved-values-in-_post/ Share on other sites More sharing options...
Adam Posted December 19, 2008 Share Posted December 19, 2008 Try something like: $key = array_search('something', $_POST); A Link to comment https://forums.phpfreaks.com/topic/137682-solved-values-in-_post/#findComment-719569 Share on other sites More sharing options...
dmccabe Posted December 19, 2008 Author Share Posted December 19, 2008 Thank you, that worked a treat! Link to comment https://forums.phpfreaks.com/topic/137682-solved-values-in-_post/#findComment-719615 Share on other sites More sharing options...
RussellReal Posted December 19, 2008 Share Posted December 19, 2008 php.net there is a WHOLE LIST of array functions, such as array_sum() and each() its always alot easier to check php.net before posting on sites like these, coz then you waste 20 mins waiting for a reply lol Link to comment https://forums.phpfreaks.com/topic/137682-solved-values-in-_post/#findComment-719627 Share on other sites More sharing options...
Lamez Posted December 19, 2008 Share Posted December 19, 2008 ya, when I first started learning php, I would always post "how can I do this", and everyone gave me a link to the manual. Then I finally learned to read the manual before posting. Link to comment https://forums.phpfreaks.com/topic/137682-solved-values-in-_post/#findComment-719629 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.