Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. Array
  2. (
  3. [Property] => Array
  4. (
  5. [S] => Built As Condominium
  6. )
  7. )
  8.  
  9. Array
  10. (
  11. [property] => Built As Condominium
  12. )
  13.  
  14. <?php
  15. $arr=Array ( 'Property' => Array ( 'S' => 'Built As Condominium' ) );
  16. foreach($arr as $k=>$arr1)
  17. {
  18. $arr[$k]=implode('',$arr1);
  19. }
  20. print_r($arr);
  21.  
  22. $array['Property'] = $array['Property']['S'];
  23.  
  24. Array ( [property] => Built As Condominium )
  25.  
  26. $data = array(
  27. "Property" => array(
  28. "S" => "Built As Condominium"
  29. )
  30. );
  31.  
  32. foreach($data as $key => $value) {
  33. if($key == "Property") {
  34. $normalized_data['Property'] = is_array($value) && isset($value['S']) ? $value['S'] : NULL;
  35. }
  36. }
  37.  
  38. array(1) {
  39. ["property"]=>
  40. string(20) "Built As Condominium"
  41. }
  42.  
  43. $array = Array ( 'Property' => Array ( 'S' => 'Built As Condominium' ) );
  44.  
  45. foreach($array as &$value){
  46. $value=$value['S'];
  47. }
  48.  
  49. $arr = array ('Property' => array( 'S' => 'Built As Condominium'));
  50. $new = array();
  51. foreach($arr as $key => $inner) {
  52. $new[$key] = reset($inner);
  53. }
  54. print_r($new);
  55.  
  56. Array
  57. (
  58. [Property] => Built As Condominium
  59. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement