![]() |
obtener elemento de un array hola comunidad no tengo claro como podria hacerlo.. tengo estas funciones Código: public function bindList(){Código: public function doSelectStudentDetails($stu_num){Código: StudentRecord Object ( [stu_num] => 470029898 [stu_fname] => test [stu_lname] => test [stu_email] => [email protected] [stu_username] => tes [stu_birthdate] => 2007-04-18 00:00:00 [stu_phone] => [stu_sex] => F [stu_province_code] => 21 [group_num] => 108 [stu_municipality] => xxxx[stu_password] => e10adc3949ba59abbe56e057f20f88 [stu_active] => 1 [stu_number] => 18 [_readOnly:private] => [_connection:private] => TDbConnection Object ( [_dsn:private] => mysql:host=localhost;dbname=proyecto [_username:private] => root [_password:private] => nightwish [_attributes:private] => Array ( ) [_active:private] => 1 [_pdo:private] => PDO Object ( ) [_e:private] => Array ( ) ) [_e:private] => Array ( ) )gracias de antemano |
Re: obtener elemento de un array Hola SidP, En el código que expones, lo que te regresa es un objeto, no un arreglo, podrías accesar así: Código PHP: |
Re: obtener elemento de un array hola GatorV y gracias por responder..... mira lo que tengo Código: object(StudentRecord)#119 (17) { ["stu_num"]=> string(9) "470029898" ["stu_fname"]=> string(4) "test" ["stu_lname"]=> string(4) "test" ["stu_email"]=> string(22) "[email protected]" ["stu_username"]=> string(3) "tes" ["stu_birthdate"]=> string(19) "2007-04-18 00:00:00" ["stu_phone"]=> NULL ["stu_sex"]=> string(1) "F" ["stu_province_code"]=> string(2) "21" ["group_num"]=> string(3) "108" ["stu_municipality"]=> string(7) "Jiguani" ["stu_password"]=> string(30) "e10adc3949ba59abbe56e057f20f88" ["stu_active"]=> string(1) "1" ["stu_number"]=> string(2) "18" ["_readOnly:private"]=> bool(false) ["_connection:private"]=> object(TDbConnection)#27 (7) { ["_dsn:private"]=> string(36) "mysql:host=localhost;dbname=proyecto" ["_username:private"]=> string(4) "root" ["_password:private"]=> string(9) "xxxxx" ["_attributes:private"]=> array(0) { } ["_active:private"]=> bool(true) ["_pdo:private"]=> object(PDO)#79 (0) { } ["_e:private"]=> array(0) { } } ["_e:private"]=> array(0) { } }Código: [Notice] Trying to get property of non-objectCódigo: Muchisimas Gracias :adios: |
| La zona horaria es GMT -6. Ahora son las 06:13. |
Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.