Hi Everyone.
I have three questions, and am wondering how these things can be achieved in PHP..
#1.
if I have a string:
$cat="meow meow I love to eat Fancy Feat meow meow"
how can I substitute all of the space characters in $cat with "%20"?
#2. if I have a variable:
$var=1
how can I convert it into a 3 digit number --> "001"?
where as it will also work for $var=11 --> "011"
?
#3. if I have many arrays like this:
$item[0]=array ('shoes' => 'nike',
'size' => '12',
'color' => 'white',
'lights' => array ('lamps' => 'floor',
'sun' => 'sky',
'stars' => 'space'));
and then several others that are just shoes.
$products[0]=array ('shoes' => 'flip flops',
'size' => '10',
'color' => 'green')
$products [1]=array.. etc etc.
Lets say I have 15 of these.. How can I add the next $product[15] and on to consist only of the info "shoes, size, and color" from the $item array?
So basically I just want to absorb part of the $item array say $item[0] through $item[20], and begin the absorbing on $product[15] through $product[35]
thank you very much for the knowledge!!!
-patrick