<?php
$b=('some data from db')
class one{
public $a=$b;
}
i want to initialize the $a with a variable outside the class, but it is not working.
Please how can do this.
Thanks in advace
kingwash 0 Newbie Poster
cereal 1,524 Nearly a Senior Poster Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
diafol
matrixdevuk commented: Good example. +4
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.