Tema: implode
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/05/2011, 11:27
charlyta
 
Fecha de Ingreso: junio-2008
Mensajes: 291
Antigüedad: 15 años, 10 meses
Puntos: 9
implode

Hola. ¿Alguien sabría decirme por qué no me funciona el implode, por favor?

Código PHP:
Ver original
  1. $where = array();
  2. foreach ($_GET as $key => $value){
  3. if ($_GET[$value]) {
  4. $_GET['value'] = str_replace("'","",$_GET['value']);
  5. $where[]="'".$_GET['key']."=".$_GET['value']."'";
  6.  
  7. }
  8. }
  9. $sql = "SELECT * FROM libros WHERE ".implode(" AND ",$where).";";