html - i want to fetch this information form that array php? -


array (     [found] => array         (             [0] => array                 (                     [id] => 1400                     [name] => ?¨?§?³u… u?uˆ?³u? ?´uˆ ?§u„?­u„u‚?© ?§u„?³?§?¯?³?© - ?¬uˆ?¯?© ?¹?§u„u??© ?±uˆ?§?¨?· u…?¨?§?´?±?©                     [visits] => 46                     [shortdes] =>  ?¨?§?³u… u?uˆ?³u? ?´uˆ ?§u„?­u„u‚?© ?§u„?³?§?¯?³?© - ?¬uˆ?¯?© ?¹?§u„u??© ?±uˆ?§?¨?· u…?¨?§?´?±?© - ???­u…u?u„ u…?¨?§?´?± ?¹u„u‰ ?§uƒ?«?± u…u† ?³u??±u??±                     [photo] => http://www.msrstars.com/up//uploads/images/msrstars.com63451f7ada.jpg                 )              [1] => array                 (                     [id] => 1399                     [name] => u…u‚?§?±u†?© ?¨u?u† ?§u„?µuˆ?± ?§u„??u‰ ?§?³???¹?·u? ?¨u‡?§ ?§u„u?u‡uˆ?¯ ?§u„?¹?§u„u… ?¨?§?«?±u‡ :: uˆ?§u„?´?¹?¨ ?§u„u?u„?³?·u?u†u‰ u??­?¯?« u…?¹?§u‡ u†u??³ ?§u„?§?­?¯?§?« uˆu„uƒu† u„?§ ?§?­?¯ u????­?±uƒ                     [visits] => 56                     [shortdes] =>  u…u‚?§?±u†?© ?¨u?u† ?§u„?µuˆ?± ?§u„??u‰ ?§?³???¹?·u? ?¨u‡?§ ?§u„u?u‡uˆ?¯ ?§u„?¹?§u„u… ?¨?§?«?±u‡ :: uˆ?§u„?´?¹?¨ ?§u„u?u„?³?·u?u†u‰ u??­?¯?« u…?¹?§u‡ u†u??³ ?§u„?§?­?¯?§?« uˆu„uƒu† u„?§ ?§?­?¯ u????­?±uƒ                     [photo] => http://www.msrstars.com/up/uploads/images/msrstars.com3a442679e4.jpg                 ) 

i want fetch

[id] => 1400                         [name] => ?¨?§?³u… u?uˆ?³u? ?´uˆ ?§u„?­u„u‚?© ?§u„?³?§?¯?³?© - ?¬uˆ?¯?© ?¹?§u„u??© ?±uˆ?§?¨?· u…?¨?§?´?±?©                         [visits] => 46                         [shortdes] =>  ?¨?§?³u… u?uˆ?³u? ?´uˆ ?§u„?­u„u‚?© ?§u„?³?§?¯?³?© - ?¬uˆ?¯?© ?¹?§u„u??© ?±uˆ?§?¨?· u…?¨?§?´?±?© - ???­u…u?u„ u…?¨?§?´?± ?¹u„u‰ ?§uƒ?«?± u…u† ?³u??±u??±                         [photo] => http://www.msrstars.com/up//uploads/images/msrstars.com63451f7ada.jpg 

and list as

list($id,$name,$visits,$shortdes,$photo) 

so example when echo $id;

it gives 1400

you can use extract:

foreach ($array['found'] $value) {     extract($value);     echo $id; } 

but you should access array indexes directly, instead of injecting variables in code. after all, that's arrays for:

foreach ($array['found'] $value) {     echo $value['id']; } 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -