Si cada vez que quieres manejar arrays en php te vuelves loco, aquí http://www.documentoweb.com/PHP/Arrays-multidimensionales-en-PHP te explican de una forma sencilla y visual, cómo son los arrays multidimensionales, y cómo se recorren. Ejemplo: $marca = array( ‘software’ => array( ‘buscador’ => array(‘Google’,’Yahoo’,’Baidu’,’Bing’), ‘CMS’ => array(‘Wordpress’,’Joomla’,’Blogger’) ), ‘hardware’ => array( ‘PC’ => ‘Mac’, ‘celular’ => array(‘Black Berry’,’Iphone’) […]
cURL alternativa a file_get_contents
Para todos aquellos que no pueden utilizar la función file_get_contents en su hosting por temas de seguridad, aquí dejo una función alternativa que hace lo mismo. public function file_get_contents_curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. curl_setopt($ch, CURLOPT_URL, $url); […]