Category "php"

phpDoc class constants documentation

How do I document class constants for phpDoc? I've read the manual but I can't find anything about them.

phpDoc class constants documentation

How do I document class constants for phpDoc? I've read the manual but I can't find anything about them.

stack vs queuing?

hello im still a student and im a bit confused about stacking and queuing ? first question is, what is the main diffrence between them two ? btw there is circ

PHP file_get_contents function

I am developing php-based websites. When I try to load a file from the same directory using file_get_contents, the server did return some string, but php code o

loop through an anchor id

I apologize is any of this does not look right, it is my first time asking a question on this site. I am creating a webpage using html, css, and php. Specifica

Convert currency string to decimal PHP

I need convert a currency string to decimal for storage it in a database of type "decimal (9,2)". Example: 0 => 0.00 1 => 1.

Explode not working properly with dash

We have this string : "Il Responsabile della Sicurezza nelle gallerie – 1° PARTE" and we want to get two part of it: Il Responsabile della Sicurezza

PHP to search within txt file and echo the whole line

Using php, I'm trying to create a script which will search within a text file and grab that entire line and echo it. I have a text file (.txt) titled "numorder

Appending data to an anchor tag

i am new to PHP , i want to append data like query string and data i will recieve by $_GET[] or $_POST[], but have facing a problem i have done something like

How do I get friend list from Friends table with counts of friends of my friends

How do I get friend list from Friends table with counts of friends of my friends (Count not of my friends) Friends table" tbl_users_friends Field 1: id Field

What is the difference between PHP require and include?

I know the basic usage of PHP require, require once, include and include once. But I am confused about when I should use them. Example: I have 3 files, eg: set

Detect if PHP session exists

Facebook now offer subscriptions to users so you can get realtime updates on changes. If my app receives an update, I plan to store it in the database. I would

PHP code for generating decent-looking coupon codes (mix of letters and numbers)

For an ecommerce site I want to generate a random coupon code that looks better than a randomly generated value. It should be a readable coupon code, all in upp

MySQL default time format UTC or GMT?

Hi I'm so confused with this UTC and GMT I'm inserting in MySQL table as ex column "event_date" like "2010-07-01 23:50:00" (datetime) my client asking an opti

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

My code was working fine: $registrado = "no"; $redirect_url = site_url( "/pedido-nao-recebido/?mpms2pagarme=retorno&codigo=nao200&mensagem=oui&reg

Could not decode a text frame as UTF-8.

Now i have struggled to get this bug fixed, but i cannot find out how to fix it, i have searched and found a solution, but it wasn't exactly a solution for the

Navigation idle on content download

Hello I have a website developed in cakePHP 2.10. For a while when I browse my site I realized that I have a loading time always in the order of 5 seconds even

PHP rotate matrix counter-clockwise

I am solving a larger problem and at one step I need to rotate a 2D array counter-clockwise. So if I have this matrix: 1 2 3 4 1 2 3 4 3 4 5 6 3 4 5 6 After

How does webserver handle HTTP POST [closed]

This might be a very basic question. But, the question that I am trying to address is that Webserver is there to handle HTTP Requests, So it's

Split a string array into pieces

Let's say I have an array that store like this: Array ( [0] => width: 650px;border: 1px solid #000; [1] => width: 100%;background: white; [2]