<input name="foo[]" ... >
I've used these before, but I'm wondering what it is called and if there is a specification for it?
I couldn't find it in the HTML 4.01 Spec and results in various Google results only call it an "array" along with many PHP examples of processing the form data.
...
I'm trying to write a query in PHP for a spatial index. But I'm having trouble writing the query for the following line of code...
SET @p = CONCAT('Polygon((',lat1,'',lon1,',',lat1,'',lon2,',',lat2,'',lon2,',',lat2,'',lon1,',',lat1,'',lon1,'))');
...
I am using curl and xml to post my xml to a URL.
I am getting response from it right now, but its not displaying in output.
when I take the View Source page by right clicking its there like the XML file output.
I need to store that xml document to a file.
I used this code below
<?
$path = "https://newport.ingrammicro.com/mustang"; /...
What is the best way to debug PHP code? I am using Dreamweaver for PHP development so is there some tool specific to Dreamweaver? If you have used Netbeans to debug JSP or Java code, you would know what I'm looking for.
...
I am getting the following error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'
The referenced lines are:
class Food {
private $q = array();
private $nutrients = array();
...
How can I fix this error?
...
i have an XML file with large number of tags. it has more than 2000 tag here and there. i want to delete all that htmlText Tag and save it as a new xml. how cani do that in PHP???
here is the code tht iam using
$remove = $doc->getElementsByTagName('htmlText');
$doc->removeChild($remove);
...
PHP: Output multiple line command-line outputs as different lines.
Sorry if the title is difficult to understand. Basically I want my output like A, instead of B. It currently looks like B. I have tried nl2br. The script I am trying to run is:
Script:
echo "Virus Scan Results:";
$scanme = system('cd /var/www/upload/files; clamscan...
I got the following php function, and want to change it into descending sorting, can someone help me:
function quickSort(&$numbers, $array_size,$level)
{
q_sort($numbers, 0, $array_size - 1,$level);
}
function q_sort(&$numbers, $left, $right,$level)
{
$l_hold = $left;
$r_hold = $right;
$pivot = $numbers[$left];
while...
I'm returning an UTF-8 XML response and some elements have user provided content, so I must ensure they are properly escaped. Is using htmlspecialchars(..., ENT_COMPAT, 'UTF-8') enough for a proper escape of an XML element text?
...
I am using GMail SMTP server to send mails.
And PHPMailer as the mail sending script.
I have received this error (I log all SMTP errors, that is whenever, PHPMailer::Send fails): -
SMTP Error: Data not accepted.<p>SMTP server error: 4.7.0 Temporary System Problem. Try again later (WS)
But the mails is actually sent. (This I know by ...
Do you know how to update status in linkedin using php script? Is that possible to do that?
...
What's the ideal way of deploying CodeIgniter projects (or any PHP projects for that matter) from your local machines to the live site? I've been using subversion for checking out and updating the code from live sites for quite some time now. But there are others who say that this practice is not good since you do not need the svn meta...
I thought that I should use JSON for ID/pass storing format once, but I reserched about it, then I finally found that JSON is too difiicult to me, so now I am considering to use CSV.
The CSV file would be like this. File name is id.csv.
aaa_id,aaa_pass
bbb_id,bbb_pass
ccc_id,ccc_pass
Left colum is id, and right colum is password an...
I have a form created with Symfony forms.
and in the template i have this selectbox, displayed on the page with the render method.
<?php echo $form['field']->render() ?>
is it possible to set the selected option of this select box?
Or does this have to be done in the class that creates this form?
There is the creation of the field...
Hi there
I have to sum some arrays(an array of arrays). The structure of my arrays is like this:
Array([id]=>some_id, [name]=>some_name, [value]=>float_value)
I know that I have N arrays as the one before. I need to sum those with the same id.
any idea?
Example:
**
Array
(
[id] => 1
[name] => John00
[value] => 0.9
)
...
I am really new to this (not new to php).
Here is my scenario:
I have 2 emails accounts. [email protected] and [email protected].
I want to send email to all my users with [email protected] but then "reply to" [email protected] (until here, my php script can handle it).
When, the email cant be sent, it sent to [email protected], the er...
Hello,
For the code below, I am trying to use the IF statement
if(mysql_num_rows($resA)>0)
to avoid running the foreach loop if $entry is not in the "site" column in any table in my database. However, if $entry does not exist in the "site" column in any table in my database, I get the error message "Warning: Invalid argument sup...
I have a function which, given a filename and directory path, checks if the directory already contains a file with the same name and if so returns an amended filename (by appending a number after the first part of the filename).
(The get_filenames() function is a CodeIgniter helper function which creates an array of all the filenames in ...
I have a MySQL database with book titles in both English and Arabic and I'm using a PHP class that can automatically transliterate Arabic text into Latin script.
I'd like my output HTML to look something like this:
<h3>A book</h3>
<h3>كتاب <em>(kitaab)</em></h3>
<h3>Another book</h3>
Is there a way for PHP to determine the language o...
I have a website with the following files in the root folder:
index.wml
index.php
How do I get it to open index.php if you are accessing via non-wap browsers, but open index.wml automatically when it is a wap browser. I suspect something must go in the .htaccess file?
...