stu_09 Posted March 14, 2007 Share Posted March 14, 2007 Hello, im an ultimate php beginner. I was wondering if it was possible to create a form to change the value of an element in an array? any help would be greatly appreciated stu. Quote Link to comment https://forums.phpfreaks.com/topic/42688-im-a-beginner-arrayform-help/ Share on other sites More sharing options...
KevinM1 Posted March 14, 2007 Share Posted March 14, 2007 Hello, im an ultimate php beginner. I was wondering if it was possible to create a form to change the value of an element in an array? any help would be greatly appreciated stu. Yes, it is possible. What are you attempting to do? Quote Link to comment https://forums.phpfreaks.com/topic/42688-im-a-beginner-arrayform-help/#findComment-207098 Share on other sites More sharing options...
stu_09 Posted March 14, 2007 Author Share Posted March 14, 2007 iv basically got a very simple array $clubs = array( "1" => "Leeds United", "2" => "Wolverhampton Wanderers", etc etc $points = array( array(club => "Leeds United", points => "138"), array(club => "Wolverhampton Wanderers", points => "95"), etc etc and iv used a foreach statement to put the data into a table. and now was wondering if it was possible to create a form to change the value of an element in the array. iv said im beginner so this may not be well explained. thanks Quote Link to comment https://forums.phpfreaks.com/topic/42688-im-a-beginner-arrayform-help/#findComment-207102 Share on other sites More sharing options...
KevinM1 Posted March 14, 2007 Share Posted March 14, 2007 iv basically got a very simple array $clubs = array( "1" => "Leeds United", "2" => "Wolverhampton Wanderers", etc etc $points = array( array(club => "Leeds United", points => "138"), array(club => "Wolverhampton Wanderers", points => "95"), etc etc and iv used a foreach statement to put the data into a table. and now was wondering if it was possible to create a form to change the value of an element in the array. iv said im beginner so this may not be well explained. thanks Is there any database involved with this, or is it just the array? Quote Link to comment https://forums.phpfreaks.com/topic/42688-im-a-beginner-arrayform-help/#findComment-207108 Share on other sites More sharing options...
stu_09 Posted March 14, 2007 Author Share Posted March 14, 2007 nope, no databases just the array thanks Quote Link to comment https://forums.phpfreaks.com/topic/42688-im-a-beginner-arrayform-help/#findComment-207110 Share on other sites More sharing options...
stu_09 Posted March 14, 2007 Author Share Posted March 14, 2007 any suggestions guys? Quote Link to comment https://forums.phpfreaks.com/topic/42688-im-a-beginner-arrayform-help/#findComment-207126 Share on other sites More sharing options...
KevinM1 Posted March 14, 2007 Share Posted March 14, 2007 nope, no databases just the array thanks If I'm reading this right, your array is a hash. Would a call to the array, like: $leedsPoints = $points['Leeds United']; echo "$leedsPoints"; //outputs 138 be true? Quote Link to comment https://forums.phpfreaks.com/topic/42688-im-a-beginner-arrayform-help/#findComment-207128 Share on other sites More sharing options...
boo_lolly Posted March 14, 2007 Share Posted March 14, 2007 http://www.tizag.com/phpT/ http://w3schools.com/php/default.asp read and learn both of those entire tutorials. that should get you started. Quote Link to comment https://forums.phpfreaks.com/topic/42688-im-a-beginner-arrayform-help/#findComment-207129 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.