hello,
i'm having a problem. static::$text variable gets lost at some point. can someone please correct and explain it to me?
Line number On/Off| Expand/Contract <?phpclass A { protected static $text; public static function init($one = '', $two = '') { $obj = new self; $obj->one = $one; $obj->two = $two; $obj->static_text = static::$text; return $obj; } public function output_text() { echo 'here shoult be some static text: ' . static::$text; }} class B extends A { protected static $text = 'this is a static text under php 5.3';} $b = B::init('first', 'second'); echo "first: {$b->one}
second: {$b->two},
static text: {$b->static_text}<hr>"; //prints out the static_text $b->output_text(); //doesn't print out the static::text value echo '<hr>'; B::output_text(); //prints out static::$text value?>
UL and LI Add Form
The idea I want here is when the user click on a character name from the drop down select bar at the bottom of the the form under case 1 and hits Add it is supposed to add it as a new LI in the UL
simplexml_load_file and rss problem
Hi,I have a problem parsing an rss feed using simplexml_load_file - this is strange as i have used the same code to parse literally 1000s of different feeds in the past, and even stranger in that if i
Material Issuing for receiving batch
Dear All experts in MM/ PP,
foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and whittle down to a few select stocks. I'm currently doing this with vb, but I'm wanting to get it
PDO returns erroneous columns from within pdt
Hi All,This is a truly weird behavior:When using a simple pdo fetch, erroneous columns are returned!Steps to reproduce:------------------------------------------------------------ -----------1.create
Remove values in array2 from array1
I have two arrays.Array 1 is where the array key holds various different numbers. For example:Code: [Select]$array[32] = 1;$array[122] = 1;$array[238] = 1;$array[324] = 1;The other array holds values
passing an array of objects after submit
How do I do this? This is what I have tried and it is not working.<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"><input
Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spamming, and not just regular spamming. They edited all the current user posts to their name, and
System copy error in RUN ABAP REPORT PHASE
Hi,
FlashVar function how to insert variables
Hi guys. Im new in this forum and also new in php programming. Can you help me about this code?<embed src='player-viral.swf' width='263' height='220' bgcolor='undefined'