PHP is an open-source server-side scripting language widely used in web development. Use this tag for questions about PHP classes, methods, functions, syntax and use.

learn more… | top users | synonyms (6) | php jobs

0
votes
0answers
2 views

how to use phpFormProtect

i am to implement phpFormProtect https://github.com/mccarthy/phpFormProtect but i can't figure out how to do. i downloaded all files upload in server, for testing set mail address in ...
0
votes
0answers
4 views

How to useJQuery dropdown checklist in a while loop

Thank you in advance, i want to use JQuery Dropdown CheckList in a while loop. But in only display the JQuery Dropdown Checklist in the first row. For the rest of the row it didn't call the JQuery ...
0
votes
0answers
4 views

issue with function setApprovalPrompt in Google/Client.php

/** * @param string $approvalPrompt Possible values for approval_prompt include: * {@code "force"} to force the approval UI to appear. (This is the default value) * {@code "auto"} to ...
0
votes
2answers
17 views

Removing last comma in array when looping without turning it into a string

I have a set of tags that I stored in the database separated by spaces as a string. When I echo them out with php, I explode them and loop through them with a for loop. My code looks something like ...
0
votes
2answers
15 views

How to limit an excerpt in wordpress?

I'm using the Events Calendar by Modern Tribe in my website and I want to modify the widget. I have everything the way I want it except for one small detail... the excerpt. This is how the section ...
0
votes
0answers
10 views

Lighttpd - How do I correctly re-write this url?

I am trying to hide the directory where my files are uploaded, which is /download/, however my script to download the file is a button that has an href of "/download/index.php" I am using lighttpd ...
1
vote
1answer
20 views

Wordpress: Having issues with is_home() and is_front_page()

I have this snippet in a "portfolio-loop.php" file. I'm using get_template_part to display the loop on the front page and on other pages. I have this within the loop: <?php if( !is_home() || ...
1
vote
1answer
16 views

Why is $db PDO object passed as null in constructor parameter?

I'm wondering why in the PHP code below, the PDO objects $db is passed as NULL. i.e. $db=NULL in the constructor parameter. class ColoredListsUsers { /** * The database object * @var ...
2
votes
2answers
20 views

Avoid repeating records displaying in MySQL / PHP

This is a very basic PHP MySQL question that I need answered. When displaying data from a table, I need to avoid/prevent duplicates. I am trying to populate a drop down menu with a list of countries ...
2
votes
2answers
11 views

Retreiving JSON data in controller from URL with cakephp

I'm trying to pass JSON encoded data from Knockout.js to an action in my controller but it's not working and showing as null. I used the same script in a non-cake php file and it worked perfectly. Is ...
1
vote
3answers
31 views

Getting JSON data with PHP

Apologies if this has been asked a thousand times, but I can't find a good tutorial on how to do this correctly and searching on Stack is coming up trumps. I have a JSON file which has data like ...
0
votes
1answer
14 views

Why is this XML attribute showing up twice

In PHP i'm using the following code to put a banner at the top of my website. $eventinfo = simplexml_load_file("eventinfo.xml"); <div id="eventinfo"><?php foreach($eventinfo->children() ...
0
votes
1answer
23 views

PHP parse_ini_file

I try to parse something from a file, and can't get it to work.. If i do: $idd = 11; $aInifile = parse_ini_file('status.ini', 'reply'); echo 'test : ' . $aInifile['reply']['11']; Then i get the ...
0
votes
1answer
13 views

Get news from a particular site - PHP

I am developing a cashew related web application for a client. The client wants to display a sidebar in the application with latest news from this site: http://www.worldcashew.com/ Could anyone ...
0
votes
0answers
12 views

Is it possible to map element name to php class (SoapClient)

Using SoapClient, is it possible to map an element name (as opposed to a type) to a php class? In the php manual: http://www.php.net/manual/en/soapclient.soapclient.php classmap is defined thus: ...

1 2 3 4 5 25928
15 30 50 per page