Foros del Web » Programando para Internet » PHP »

obtener dato de un array

Estas en el tema de obtener dato de un array en el foro de PHP en Foros del Web. Hola a todos es que tengo esto @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código PHP: Ver original $capsule = new Capsule ; $capsule -> addConnection ( [     ...
  #1 (permalink)  
Antiguo 25/07/2019, 03:13
 
Fecha de Ingreso: junio-2012
Ubicación: En el Mundo
Mensajes: 759
Antigüedad: 11 años, 10 meses
Puntos: 10
obtener dato de un array

Hola a todos es que tengo esto

Código PHP:
Ver original
  1. $capsule = new Capsule;
  2. $capsule->addConnection([
  3.     'driver'    => 'mysql',
  4.     'host'      => 'localhost',
  5.     'database'  => 'fos',
  6.     'username'  => 'iptv',
  7.     'password'  => '1234',
  8.     'charset'   => 'utf8',
  9.     'collation' => 'utf8_unicode_ci',
  10.     'prefix'    => '',
  11.     'dump_command_path' => '/mysql/bin',
  12.     'dump_command_timeout' => 60 * 5,
  13.     'dump_using_single_transaction'    => true,
  14. ]);
  15. $capsule->setAsGlobal();
  16. $capsule->bootEloquent();

y con esto obtengo un print del array
print_r( $capsule);

y resultado es este

Illuminate\Database\Capsule\Manager Object ( [manager:protected] => Illuminate\Database\DatabaseManager Object ( [app:protected] => Illuminate\Container\Container Object ( [resolved:protected] => Array ( ) [bindings:protected] => Array ( ) [methodBindings:protected] => Array ( ) [instances:protected] => Array ( [config] => Illuminate\Support\Fluent Object ( [attributes:protected] => Array ( [database.fetch] => 5 [database.default] => default [database.connections] => Array ( [default] => Array ( [driver] => mysql [host] => localhost [database] => fos [username] => iptv [password] => 1234 [charset] => utf8 [collation] => utf8_unicode_ci [prefix] => [dump_command_path] => /mysql/bin [dump_command_timeout] => 300 [dump_using_single_transaction] => 1 ) ) ) ) ) [aliases:protected] => Array ( ) [abstractAliases:protected] => Array ( ) [extenders:protected] => Array ( ) [tags:protected] => Array ( ) [buildStack:protected] => Array ( ) [with:protected] => Array ( ) [contextual] => Array ( ) [reboundCallbacks:protected] => Array ( ) [globalResolvingCallbacks:protected] => Array ( ) [globalAfterResolvingCallbacks:protected] => Array ( ) [resolvingCallbacks:protected] => Array ( ) [afterResolvingCallbacks:protected] => Array ( ) ) [factory:protected] => Illuminate\Database\Connectors\ConnectionFactory Object ( [container:protected] => Illuminate\Container\Container Object ( [resolved:protected] => Array ( ) [bindings:protected] => Array ( ) [methodBindings:protected] => Array ( ) [instances:protected] => Array ( [config] => Illuminate\Support\Fluent Object ( [attributes:protected] => Array ( [database.fetch] => 5 [database.default] => default [database.connections] => Array ( [default] => Array ( [driver] => mysql [host] => localhost [database] => fos [username] => iptv [password] => 1234 [charset] => utf8 [collation] => utf8_unicode_ci [prefix] => [dump_command_path] => /mysql/bin [dump_command_timeout] => 300 [dump_using_single_transaction] => 1 ) ) ) ) ) [aliases:protected] => Array ( ) [abstractAliases:protected] => Array ( ) [extenders:protected] => Array ( ) [tags:protected] => Array ( ) [buildStack:protected] => Array ( ) [with:protected] => Array ( ) [contextual] => Array ( ) [reboundCallbacks:protected] => Array ( ) [globalResolvingCallbacks:protected] => Array ( ) [globalAfterResolvingCallbacks:protected] => Array ( ) [resolvingCallbacks:protected] => Array ( ) [afterResolvingCallbacks:protected] => Array ( ) ) ) [connections:protected] => Array ( ) [extensions:protected] => Array ( ) ) [container:protected] => Illuminate\Container\Container Object ( [resolved:protected] => Array ( ) [bindings:protected] => Array ( ) [methodBindings:protected] => Array ( ) [instances:protected] => Array ( [config] => Illuminate\Support\Fluent Object ( [attributes:protected] => Array ( [database.fetch] => 5 [database.default] => default [database.connections] => Array ( [default] => Array ( [driver] => mysql [host] => localhost [database] => fos [username] => iptv [password] => 1234 [charset] => utf8 [collation] => utf8_unicode_ci [prefix] => [dump_command_path] => /mysql/bin [dump_command_timeout] => 300 [dump_using_single_transaction] => 1 ) ) ) ) ) [aliases:protected] => Array ( ) [abstractAliases:protected] => Array ( ) [extenders:protected] => Array ( ) [tags:protected] => Array ( ) [buildStack:protected] => Array ( ) [with:protected] => Array ( ) [contextual] => Array ( ) [reboundCallbacks:protected] => Array ( ) [globalResolvingCallbacks:protected] => Array ( ) [globalAfterResolvingCallbacks:protected] => Array ( ) [resolvingCallbacks:protected] => Array ( ) [afterResolvingCallbacks:protected] => Array ( ) ) )

y quiero poder obtener los datos de la base dato como puedo hacer esto posible

Etiquetas: dato, mysql
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:56.