Can anyone please explain a recursive function to me in PHP (without using Fibonacci) in layman language and using examples? i was looking at an example but the Fibonacci totally lost me!
Thank you in advance ;-)
Also how often do you use them in web development?
...
Hello,
I am using macports on my machine and I realized that curl is not enabled. Is there anyway to enable it without completely reconfiguring php?
Thanks!
...
I have an exceptionally bad CSV file. Although I "solved" the problem in the end by manually writing scripts to process and reprocess this specific file I wanted to know if there were any other solutions out there.
You have a CSV file that has all the fields terminated by | (pipe) characters. Running a quick check shows you that there a...
Im doing a simple mysqli query with code ive used many times before but have never had this problem happen to me. I am grabbing an entire table with an unknown number of columns (it changes often so i dont know the exact value, nor the column names). I have some code that uses metadata to grab everything and stick it in an array.
This a...
I would like to write a script that can receive e-mail and then do something depending on instructions in that e-mail, but I have no idea where to start with this. Is this possible with PHP?
...
I'm currently writing out xml and have done the following:
header ("content-type: text/xml");
header ("content-length: ".strlen($xml));
$xml being the xml to be written out. I'm near about 1.8 megs of text (which I found via firebug), it seems as the writing is taking more time than the script to run.. is there a way to increase this...
http://www.easysavannah.com/myspace1/template/default/css.css
I use this program now to beta a Myspace type site >
...
Is there a quicker way of creating a date such as:
echo date('Y-m-d', mktime(0, 0, 0, date("m"), date("d")+3, date("Y")));
Thanks if you can help.
...
I'm looking for a thin, generic layer (probably written in PHP) that sits between a database (probably MySQL) and web service clients (which could be anything). I imagine there would be config files of some sort that tell it how to map web service requests to database queries (or other DB commands). It would also need to handle authent...
I have an array containing arrays of names and other details, in alphabetical order. Each array includes the first letter associated with the name.
Array
(
[0] => Array
(
[0] => a
[1] => Alanis Morissette
)
[1] => Array
(
[0] => a
[1] => Alesha Dixon
...
I found PHP code online to download attachments to a directory using IMAP from here. http://www.nerdydork.com/download-pop3imap-email-attachments-with-php.html
I modified it slightly changing
$structure = imap_fetchstructure($mbox, $jk);
$parts = ($structure->parts);
to
$structure = imap_fetchstructure($mbox,...
Hi
I have a problem in my code.
can anybody help me ...
<html>
<body>
<script type="text/javascript">
<?php
$conn = mysql_connect("localhost","root");
mysql_select_db("tr", $conn);
$q = mysql_query("SELECT message FROM messages WHERE to_viewed = '0' ");
if (mysql_num_rows($q)) {
...
I'm new to the IMAP protocol and Zend_Mail_Storage and I'm writing a small php script for a cron job that should regularly poll an IMAP account and check for new messages, and send an e-mail if new messages have arrived.
As you can imagine, I want to only poll the IMAP account for relevant messages, and I only want to send a new e-mail ...
I want to use asymmetric encryption of headers in RESTful requests to verify the identity of the system sending the request: i e System A encrypts it's name, timestamp, and the service name using it's public key in a request to System B. System B then uses the public key of System A to decrypt, proving the authenticity of the request.
1...
I'm somewhat new to jQuery, so I could use some help here.
This is my issue:
I have a php script outputting a dynamic table. Each row has an "edit" button, plus some other fields. Only 3 of those need to be turned into an input box. The edit button should only put that specific row into "edit mode." I got as far as assigning each r...
I need to know how to make a rating script for a site. I have a form that submits a rating out of ten to mysql. How would you get the average rating to be displayed from the mysqk column?
---using PHP with mysql
...
Hi All,
I am trying to build a shopping cart site. When a user click add to cart image on the product page, The product title will show a "The product is in your cart" text without reloading the page. I am using session and ajax but no luck so far. I appreciate any helps.
My html cold
<table id="<?php echo $productId; ?>" width="59...
I have a form that adds links to a database, deletes them, and -- soon -- allows the user to edit details. I am using jQuery and Ajax heavily on this project and would like to keep all control in the same page. In the past, to handle editing something like details about another website (link entry), I would have sent the user to another ...
I was given the daunting task of converting a ASP website to PHP and SQL Server to MySQL, and I ran into an issue that hopefully somebody can help
I have a user table which has a password field with datatype Varbinary(128), are using pwdencrypt to encrypt the password.
Is there a way to transfer that over to MySQL, and somehow i need t...
What's an efficient way of checking if a username contains a number of special characters that I define.
Examples: % # ^ . ! @ & ( ) + / " ? ` ~ < > { } [ ] | = - ;
I need to detect them and return a boolean, not just strip them out.
Probably a super easy question but I need a better way of doing this than a huge list of conditionals ...