php5

difference between object and static methos

whats the difference between static and object methods? where and why are they use differently? when do I use which one of those ...

can I use HTML templates in joomla?

I am very new in Joomla.I have to create one simple static applicatin in joomla.Can I use my HTML templates or joomla temlates are diffrent?Where we use PHP in joomla?From where I have to start?means whether I have to create html template first and then move it to joomla OR have to create page template in joomla itself? ...

convert following string into array using explode()

HI, I have a string: NEW ALPINESTAR​S SMX PLUS WHITE MOTORCYCLE BOOTS! 44/9.5$349.95 Time Left 1h 2m NEW AGV BLADE FLAT MATTE WHITE LARGE/LG HELMET$75.53Time Left 1h 2m I want result in array like this: Productname Price time NEW ALPINESTAR​S SMX PLUS WHITE MOTORCYCLE BOOTS! 44/9.5 $349.95 Time Left 1h 2m ...

Are mysql_close and pg_close required ?

Possible Duplicate: using mysql_close() Are mysql_close and pg_close required ? In some script there aren't... why ? What happen if I don't use its ? ...

How should I implement lazy session creation in PHP?

By default, PHP's session handling mechanisms set a session cookie header and store a session even if there is no data in the session. If no data is set in the session then I don't want a Set-Cookie header sent to the client in the response and I don't want an empty session record stored on the server. If data is added to $_SESSION, then...

what does this do, preg_match

preg_match('/^(AREA|TEST)$/i', $arrow) ...

PHP: Modifying array recursively?

Hi everybody, I have tried to make a function that iterates through the following array to flatten it and add parent id to children, where applicable. I just can't make it work, so I hope that anyone here has an idea of what to do: Here's the starting point: Array ( [0] => Array ( [id] => 1 [children] => ar...

Why would I be seeing execution timeouts when setting $_SESSION values?

I'm seeing the following errors in my PHP error logs: PHP Fatal error: Maximum execution time of 60 seconds exceeded in D:\sites\s105504\www\index.php on line 3 PHP Fatal error: Maximum execution time of 60 seconds exceeded in D:\sites\s105504\www\search.php on line 4 The lines in question are: index.php: 01 <?php 02 session_star...

Setting "submit"

Driving me a bit nuts this one, have tried alsorts of combination's... At the top of my file I have PHP Code: if (!ISSET ($_POST['submit'])) which tests if the submit has been hit, if not displays the form.... What I'd like to be able to to is generate a link that would be processed directly by the php code that the form would normall...

$myClass->IdentifierIDs = String::ListIntegers($pv->IDs, ',', ',', 1);

what does $myClass->IdentifierIDs = String::ListIntegers($pv->IDs, ',', ',', 1); do. i never seen string:: thanks ...

Symfony test that runs before any other tests?

Is there a way to create test that is running before any other tests in the 'test' folder. I'd like to create a test that checks the php.ini settings before any other tests are run. Thanks Ralph ...

get_browser not working

it's not working.i mean i have many scripts to get ip and os but anyway get_browser is internal function and should work but its not.when i try to get a print_r on the function i get. Array ( [browser_name_regex] => §^.*$§ [browser_name_pattern] => * [browser] => Default Browser [version] => 0 [majorver] => 0 [minorver] => 0 [platform] ...

How many cookies can I set throught a single domain ?

Is there some limit ? or can I set 100000000 cookies throught a single domain ? ...

How to resize an image using PHP?

Possible Duplicate: Resize a picture to a fixed size How to resize an image in PHP? ...

How can I "flip" an image using PHP?

Possible Duplicate: How to resize an image using PHP? Here's what I've tried: $image = "images/20100609124341Chrysanthemum.jpg"; $degrees = 40; // Content type header('Content-type: image/jpeg'); // Load $source = imagecreatefromjpeg($filename); // Rotate $rotate = imagerotate($source, $degrees, 0); // Output imagejpeg...

How to pass arguments to access rules expressions in yii framework controlers

ow to pass arguments to accessRules experessions The code below doesn't work becouse $owner_id is not defined in class where expression is evaluated. Any ideas how to fix it? public function accessRules(){ $owner_id = $this->loadModel()->owner_id; return array( ... array('allow', 'actions'=>array('update'), ...

How to run several fastcgi processes for nginx (spawn-fcgi)

I want to run several fastcgi processes with different users and different php.ini . But unfortunately I found information about running one process only. http://www.howtoforge.com/installing-nginx-with-php5-and-mysql-support-on-ubuntu-9.04 There is mod suexec for Apache which allows to do it. Does anyone know something like that for f...

Updated Timestamp field in MySQL through PHP

All, I have a database table in mysql with a field that is of "TIMESTAMP" type. I need help writing the SQL query to update the field with the current timestamp. UPDATE tb_Test set dt_modified = ????? Thanks, ...

MySQL Search Within Database (Table Search)

Alright, I'm trying to write a piece of code (PHP and SQL), or rather a search query to display all the tables that contain a certain prefix. Something like what is displayed below (but is obviously incorrect) SELECT TABLES LIKE chat_ So any table that has the chat prefix, would be displayed. I plan on formatting the output, so it's n...

Removing part of a string in PHP

I'm trying to take a query: SHOW TABLES; which will display a bunch of tables with the chat_ prefix. I want to remove the chat_ prefix from the string, format the variable (with a link), and display it. How is this accomplished? ...