View Single Post
  #1  
Old 08-11-2006, 02:17 PM
benaud benaud is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
benaud is on a distinguished road
Default way to merge Hash (Array) dynamically?

I want to store key and values in one array. I am getting values through POST method.. If i get value then store in hash.. else not..

suppose

PHP Code:
<?php
$values=array // HASH ARRAY //
if($_POST['name']) { ('name'=>$_POST['name']);
if($_POST['email']) { ('email'=>$_POST['email']);
if($_POST['phone']) { ('phone'=>$_POST['phone']);

// How to create associative array for this type of condition ???? //
?>


I hope, you understand now, what i mean?? How to push above values in Associative array ?? (If i found value then and then it should be push else not) -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - way to merge Hash (Array) dynamically?
View Single Post
  #1  
Old 08-11-2006, 02:17 PM
benaud benaud is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
benaud is on a distinguished road
Default way to merge Hash (Array) dynamically?

I want to store key and values in one array. I am getting values through POST method.. If i get value then store in hash.. else not..

suppose

PHP Code:
<?php
$values=array // HASH ARRAY //
if($_POST['name']) { ('name'=>$_POST['name']);
if($_POST['email']) { ('email'=>$_POST['email']);
if($_POST['phone']) { ('phone'=>$_POST['phone']);

// How to create associative array for this type of condition ???? //
?>


I hope, you understand now, what i mean?? How to push above values in Associative array ?? (If i found value then and then it should be push else not) -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote