Echoing a Variable from a Object


Posted on 16th Feb 2014 07:03 pm by admin

How do I get a variable from the new User Class to echo out in this clasS?

class MyApp
{
Did you know?Explore Trending and Topic pages for more stories like this.

function __construct()
{
global $dbHost;
global $dbUser;
global $dbPass;
global $dbName;

$this->DB = new Database;
$this->DB->connect($dbHost, $dbUser, $dbPass, $dbName);

$User = new User;

echo $User->login;
echo $this->User->login;

}


}

No comments posted yet

Your Answer:

Login to answer
271 Like 8 Dislike
Previous forums Next forums
Other forums

help with php
It's not displaying or pulling anything out of the database.


Code: <html><

Material Issuing for receiving batch
Dear All experts in MM/ PP,

Material issuing from main stores to factory is currently usi

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

Disable Scrollbar in TableControl
Hello everbody,

please can anybody help me - outherwise i'm going to become desperate :P<

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

Image resize
Hi again fellers

I managed to sort out the issues with the folder,

Final hurdle is th

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

rename the file
File.txt

Code: ***DOCUMENT***
..DN:
000044255
..CB:
..SN:
..PY:
2009
..E

FTP issues
Hi all,


I am currently facing some serious problems with a script and really need some ad

Finding digits in variable containing text, and IDing them
$romanstock = "http://www.remoteprice.com/data.asp?storeid=123&itemcode=456&typ

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash