Here is a short snippet from my class extending Zend_Form:
$this->addElements(array(
$inputField1,
$inputField2,
$inputField3,
$submitButton
));
$this->addDisplayGroup(array('inputField1',
'inputField2',
'inputField3',
'submitButton')...
Is it possible, in PHP, to flatten a (bi/multi)dimensional array without using recursion or references?
I'm only interested in the values so the keys can be ignored, I'm thinking in the lines of array_map() and array_values().
...
iframes are not supported in xhtml strict. However, in my application I am using php recaptcha which requires the use of iframes. What are the downsides of just switching to xhtml transitional (if any)?
...
It's supposed to match the text inside any h1, h2, or h3 tags.
preg_match("<[hH][1-3][^>]*>(.*?)<[hH][1-3]>", $text, $matches);
echo $matches[0];
But it never catches any.
...
Hello, I am a PHP and ExtJS user. I am looking into developing an application using a good PHP framework (CakePHP; good as in "I consider this good for me") and ExtJS version 3. What I would like to achieve is a complete Ext viewport with many grids and functions that would call PHP urls for retrieving data, saving data, edit/remove data...
So I have a script that I debug with a bunch of echo statements. This is run every 3 minutes on my server by cron, and I sometimes leave the echo statements in there. They're not going to a browser, they're just going... anywhere?
This is a vague question I guess, but what happens when there's no end-user or output for an echo statement...
I have a Netflix/Amazon style star-rating system. Thus, the stars temporarily light up onMouseOver and a click is supposed to trigger a PHP call and a permanent change in star color.
Everything works, although the onClick event isn't triggered until the second click. It appears that this is because the onMouseOver event is still activ...
I've been playing around with PHP Streams and have been experimenting by beginning to write the class shown here. The PHP docs are bit lean in this area to say the least.
I'm having a difficult time with getting my stream context to invoke the callback method specified. If I use a function like file_get_contents or fopen to connect to a...
Hi there,
This is the case. At test.php, I have a function dotask(a,b,c,d);
This function need to do task that need 2-4 minutes to complete.
Task including insert new record into db, curl call to other url to do task and etc.
However, I want test.php to:
Just make sure dotask(a,b,c,d) is called, no need to wait until task completed th...
i want to create a script which could open gmail account and analyze mails body. for this i want to use IMAP for reading mails and opening gmail account. but i m in a problem to configure IMAP for php.
...
Hi, I've been developing a site (for now is here as an example: http://neurotoxine.mine.nu/gloom), and I'm getting a strange behaviour from a styleswitcher code. It's big so please be patient.
First, you may go to the site I appointed first and see it.
What you've got there, it's a joomla page, with a Jquery using
var $j = jQuery.noCon...
I want to send mail to hundreds of email addresses in PHP using php mail function.
How can I do that?
...
I'm trying to write a script in PHP5 that will:
read in an XSD
let the user give an element/tag name which will serve as the context
output a list of elements allowed within that element/tagname based on the XSD
So far I'm only able to see solutions for using XSDs to validate XML files. Anyone done something like this before?
...
I'm playing around with Symfony and have encountered a road block.
I created a model "CmsPage" which has a field called "content" which is stored as a clob (this is specific to doctrine I believe). When I created the app I set "--escaping-strategy=on" so if I enter any html when editing a CmsPage that gets encoded with html entities or...
I have searched on google for hours without finding a good and simple example of the comet technique using PHP. I just need an example that uses a persistent HTTP connection or something similar. I dont want to use a polling technique because I have something like that set up and not only is it difficult to work with and manage its a big...
Hi friends,
i need a help,
i was set the file in cron job.
that file is also execution in browser also
example : http://example.com/cron.php
how can i restrict in browser excution
Thanks
Siva kumar
...
I work with symfony framework and Propel and i was wandering what is the easiest way to encrypt a database. I'm not talking about passwords but all the database . I built a small web application for a client that manages some information (user accounts, passwords etc) and i don;t want it to be visible if someone has access to phpmyadmin ...
Hello,
I'm very new to WordPress and have no PHP or CSS experience...
I'm want to use Subscribe2 plugin in my blog, together with iNove theme. When I add the widget, the Subscribe/Unsubscribe buttons are rendered in the "classic" way, which makes the page quite ugly (the blog is at: http://www.adlerr.com)
How can I customize the ap...
well...just about all I needed to say...lookie here, I'm a total noob in web programming so go easy on me..and oh...if ever it is...could you point me to a simple example? i've worked wiht cURL on a payment API (Authorize.net) but I can't seem to get the picture of how it applies to web services
...
Hi guys, I have a simple social network project going and I would like to add a simple recommend this user profile function. A logged in user can 'recommend' a user once - its just like the 'This ansewr is helpful/not helpful' buttons here on posts in Stackoverflow. I want a simple table design to implement the exact idea - any tips?
A ...