![]() |
Re: Working With Arrays in PHP
You can initialize Numeric Arrays like this also,
Code: PHP
You can print associative arrays like this, Code: PHP
|
Re: Working With Arrays in PHP
thanks for this code
|
Re: Working With Arrays in PHP
Amazing ...
|
Re: Working With Arrays in PHP
Assuming that you have three arrays which might contain different values as follows.:
PHP Code:
|
Re: Working With Arrays in PHP
Code:
<?php |
Re: Working With Arrays in PHP
<?php
function arrays($array1,$array2) { echo $array1.' '.$array2; } arrays(myname,lastname); echo arays(); ?> Is this code is correct and where is the fault and how i can change it . i want that user enter value in it and it show its name and last name in an array in the database. |
Re: Working With Arrays in PHP
If u want that the user should enter the values and it should be displayed on the database. Then you have to accept the values from the form and use the command : mysql_query("INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...)"); to insert into the database
|
Re: Working With Arrays in PHP
Nice post.......
|
Re: Working With Arrays in PHP
<?php
$arr = array("foo" => "bar", 12 => true); echo $arr["foo"]; // bar echo $arr[12]; // 1 ?> |
| All times are GMT +5.5. The time now is 08:10. |