php

c++ to php conversion

I have wroted a LU writed in c++ and I need add same code to php i did it it's woarks but in php i have diffrent results. Main calculate in c++ are: for (int i=0;i<m;i++) { for (int j=0;j<m;j++) { cout << tab1[i][j]<<"\t"; } cout <<endl; } for (int i=0;i<m;i++) ...

Building magento modules

I'm just about to start building my first magento module but I can't find any literature on the difference between the local and community folder in core. I've noticed that some people build their modules in local and others in community, what is the difference and why should I use one or the other? Thanks ...

PHP post textfield and request data - (I believe this might be simple too)

I don't know where to begin.. I have 2 pages. The first page is a form that has 4 textfields that pass to the second page and separate each with an comma (only if they filled something into a field - so if they only filled one field in, it would not have any commas) and ending with a period. How do I do this in PHP? ...

How to call PHP function from string stored in a Variable

I need to be able to call a function, but the function name is stored in a variable, is this possible? e.g: function foo () { //code here } function bar () { //code here } $functionName = "foo"; // i need to call the function based on what is $functionName Anyhelp would be great. Thanks! ...

How to fix fatal error in joomla 1.0?

This is the error: Warning: require_once(/home/exhibit/public_html/includes/version.php) [function.require-once]: failed to open stream: No such file or directory in /home2/exhibit/public_html/includes/joomla.php on line 71 Fatal error: require_once() [function.require]: Failed opening required '/home/exhibit/public_html/includes/versi...

Working with date ranges in PHP/Oracle

Hi guys, I need to work out how many different instances occur on a different day, from many different ranges. Probably best to explain it with an example. 18-JAN-09 to 21-JAN-09 19-JAN09 to 20-JAN-09 20-JAN-09 to 20-JAN-09 Using the three examples above, I need it to collect this information and display something a little like... 1...

php xml parsing

$xml = curl_exec($ch); i hava an xml object like this which is retruned from a webservice. how can i parse this in PHP????? ...

retriving CURTIME() from server by adding 3hrs and show it in PHP page

Hi, How can I retriving CURTIME() from server by adding 3hrs and show it in PHP page. Thanks in advance. ...

Is there a minimum wait time in between twitter messages?

Hello all, Consider this: require 'Twitter.class.php'; $tweet = new Twitter("username", "password"); foreach($comment as $key => $value) { $link = $db->get_row("sql query"); //sleep(10;) $tweet->update('$link'); } } This makes a new twitter message for every loop, the loop happens about 10 times and I e...

adding label from javascript

hi , i am trying to add a label from javascript but im getting error what i did was: document.getElementById(option).innerHTML="<label onclick='updateInfo('edit','qualification',"+data_id+","+data+")>"+data+"</label>"; what am i doing wrong ? ...

how to get function name inside a function in PHP?

Is it possible? function test() { echo "function name is test"; } ...

Regex, match newlines between tags

I have this regex in PHP: preg_match('/\[summary\](.+)\[\/summary\]/i', $data['text'], $match); It works fine when the text between the summary tags is on one line. However, when it contains newlines, it doesn't match. I've tried to find a correct modifier here: http://nl2.php.net/manual/en/reference.pcre.pattern.modifiers.php But th...

swf to pdf using php

Is there any way to convert a SWF to pdf using php. i mean the page has a button on the click it must export the swf contents in pdf. ...

Zend_Form_Element_File - file gets lost when form errors

I'm creating a Zend Form which includes a Zend Form Element File to allow the user to upload a file. When there is an error on the form (i.e. validation fails), when it is re-displayed for the user to correct, the file upload box is empty (so they have to click browse and select it again). Is it possible to get it to save the file? ...

PHP: Is it possible to call the class that created you?

I have a class in php that creates another class, and I want this child class to be able to call the parent class, but without passing $this as an argument to the child class. I don't want to make the parent class global either. Is there a way to call the parent class, somehow like parent->function or something similar? ...

Is there any difference between 'print' and 'echo' in PHP?

Possible Duplicate: How are echo and print different in PHP? UPDATE : I found to my relief an exact duplicate (it wasn't showing up when I typed this question at first, I found it with ... google): Please vote with me to close this question, because it's tiring, go hunt that other poor guy a bit ;-) Is there any difference ...

saving file using curl

how can i save a file using curl and php ...

What does "&" mean here in PHP?

call_user_func(array(&$this, 'method_name'), $args); I know it mean pass-by-reference when defining functions,but is it when calling a function? ...

Setting PHP session variables using Flash Actionscript

Hello all, I have a simple PHP upload script that is called from my Flash App. I am sure it makes the call because it actually uploads the file! session_start(); $default_path = 'files/'; $target_path = ($_POST['dir']) ? $_POST['dir'] : $default_path; if(!file_exists($target_path)) mkdir($target_path, 0777, true); $destination = $t...

PHP SOAP : How can I return objects from PHP using SOAP?

I need to send/return objects or array to/from PHP using SOAP. Any good links? ...