Hi,
I have a bit of experience with PHP but not extensive. It seems I cannot store any items to the array $details.
The class:
class Newsletter {
public $details = array();
function Newsletter($id) {
$details['id'] = $id;
echo "From same function: " . $details['id'];
$this->Load();
}
function Load() {
echo "From sibling function: " . $details['id'];
}
}
The call from the webpage:
$x = new Newsletter(123);
//output
From same function: 123
From sibling function:
Is there a special way to interact with the array so that it sticks for use with other functions?
Thanks
Can you help please? Php file
I have to write this php file to allow users to register their nicknames on nickservFor an IRC server, however it worked fine for a couple of years, I then upgraded from Php4 to Php5 and suddenly
reorder sql query
ok so i have this very simple code:Code: $query = "SELECT search_keywords, COUNT(search_keywords) AS counter FROM phpbb_popsearch GROUP BY search_keywords ORDER BY counter DESC limit 5";
HTAccess auto log in?
Hi all.Too busy driving celebs about lately so I hope someone here can help me out.I need a script that will allow a user to access an HTAccess directory automatically, without the need of
WORDPRESS - Multiple Loops Only Going to One Post?
I have various pages with multiple loops and i need them to be individual to all other categories.2 columns.Left column shows 4 posts from category news just with the date and some custom
Not Loading Function Into Div
I'm not sure whether to put this under the php forum or ajax forum but because I tink it's more of an issue wit the php code itself I decided to put it here. I came across this file from a friend that
Staff Induction System - No idea where to go from here!!!
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right direction with this problem I have.I am trying to set up a system induct new members of staff onto their
Need some ideas as to how to go about sorting this array...
Here's how the array's are created..Code: <?phpwhile ($x = readdir($dp)) { $order[] = $p['order']; $files[] = $x;}?>Here's a sample of how they come out..Code: Array( [0]
File upload issues
Hi Guys,Can anyone see any issues with this code:Code: [Select]$setImage= 'productimages/' . date(U) . $HTTP_POST_FILES['setImage']['name'][0];copy($HTTP_POST_FILES['setImage']['tmp_name'][0],
simple php table loop
Hi all,I've the following code <?php // Create category options $query = "SELECT * FROM categories ORDER BY category ASC"; $result = mysql_query
Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming out 5 hours differen't to what I want them to. I attempted placing the following in my Header