<?php
$firstArray = Array();
$firstArray [a] = "One";
$firstArray = "Two";
$firstArray [c] ="Three";
$firstArray [d] ="Four";
$secondArray = Array();
foreach($firstArray as $key=>$value){
$secondArray[$value] = $key;
}
echo '<pre>';
print_r($firstArray);
print_r($secondArray);
echo '</pre>';
?>
Cheers,
Gitlez
$firstArray = Array();
$firstArray [a] = "One";
$firstArray = "Two";
$firstArray [c] ="Three";
$firstArray [d] ="Four";
$secondArray = Array();
foreach($firstArray as $key=>$value){
$secondArray[$value] = $key;
}
echo '<pre>';
print_r($firstArray);
print_r($secondArray);
echo '</pre>';
?>
Cheers,
Gitlez