Ver Mensaje Individual
  #7 (permalink)  
Antiguo 16/02/2012, 10:42
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Recorrer un arbol solo con el id....

Con un simple if lo puedes hacer, solamente comparas:
Código PHP:
Ver original
  1. function obtenId($idBuscar) {
  2.        foreach() {
  3.               if ($id == $idBuscar) {
  4.                       return $array;
  5.               }
  6.        }
  7.  
  8.        return false;
  9. }

Saludos.