Forum Moderators: coopster
So if this is my table:
CREATE TABLE `example` (
`id` int(10) unsigned NOT NULL auto_increment,
`text` text NOT NULL,
PRIMARY KEY (`id`),
);
I'm trying to get it so that if I have like several form fields and I enter text into each of the text boxs I want all that stuff to be saved in the text row. But then I want them to kind of be separated in that table cell thing so that later I can come back and extract it piece by piece.
I was looking in my mysql database for examples and this is what I found:
a:8:{i:3;i:3;i:9;i:9;i:10;i:1;i:8;i:5;i:7;i:1;i:2;i:1;i:13;i:1;i:19;i:2;}
something like that. But then some how the person who made the PHP program that put that stuff in the sql database some how made it so he/she could extract it to. Thats what I'm trying to do... How would you do something like that?
I'm hoping this makes since =/
Lets say this is my original array that I got after I unserialized it from my mysql:
$ages = array("3"=>1, "28"=>3);
I want to now how I can increase $ages[3] by 1 and then put it back in the array and update it into the sql. So when its in the mysql it should look like this:
a:2:{i:3;i:2;i:28;i:3;}
and unserialized it should look like this:
array(2){[3]=>int(2)[28]=>int(3)}
Or something like that...
Can anyone help?