Questions for php


8004

Rewriting urls with mod_rewrite - GET variables

I found out I could make clean urls with mod_rewrite. I managed to make pages like /home.php viewable by visiting /home (without .php).
9948

How to figure out where this database insertion and retrieval is breaking?

Problem solved...variable undefined. I will add full answer when stackoverflow allows me to answer own question
627

How to use an XML string to find certain element values in php?

How to use an XML string to find its certain element values?
9401

Compress and download from 3rd party ftp server using php

I'm downloading files from 3rd party ftp server using php. But file is more then 15mb. So it took more time to download. I have an idea to compress and download on the fly from ftp server. Is it po...
3004

defining an initial variable in a new object in php

I am new to OOP so forgive me if my question is flawed.
3323

Files showing up in terminal run, not in browser

I'm trying to list the files in a directory, but only the HTML portion of the page shows up in my browser. When I run the page through the PHP terminal interpreter, all the files are listed with the
7664

How to create a custom drupal cms from starting

Actually i need to know how and where the page content for each drupal page comes. So i tried to integrate my own custom theme to drupal. In the tutorial they are saying like i need to create a cus...
4555

Problems iterating PersistentCollection

I'm new to Doctrine and I'm having an issue iterating over a PersistentCollection, I have some basic entities set up with a ManyToMany relationship:
3894

splitting multi-line email address entries

I'm having problems with splitting an array correctly. I have a textarea input that allows for multiple email addresses to be entered one per line. Once entered I'm turning this into an array and ...
8191

decoding Timestamps explicitly encoded in a filename

Quite a while ago I decided to change the way filenames are formatted when users upload a file to my website(which was a great idea!) to include the UNIX_Timestamp in the filename, this proved very
9797

Text formatting doesn't appear in emails that have been formatted using TinyMCE and sent using SwiftMailer

I use SwiftMailer in my PHP scripts to send emails and I use TinyMCE as a text editor to write and format the message body. The problem is that when I send the message it appears without any format...
826

PNG Transparency with PHP

Hey having some trouble trying to maintain transparency on a png when i create a thumbnail from it, anyone any experience with this? any help would be great, here's what i am currently doing:
9735

Dynamically populate two dropdown menus

I'm not (as I am certain you'll notice below) a programmer or coder. I write network documentation manuals.
7499

How to refactor PHP to help improve SQL Server speed?

I've been tasked with finding a solution to some performance issues we've been having with our PHP web application (basically, we're reaching a "failure" point when combining high-volume users with...
7361

Why does array_unique sort the values?

This refers to one of my previous questions: array_unique vs array_flip - This states that array_flip(array_flip()) is much quicker than array_unique() when dealing with simple strings and integers.
8125

UTC clock based on server time?

I have a JavaScript clock that gets the time in UTC, it currently works, but the time is based off the client's computer. What could I do to base the time off of the server instead? I am using PHP ...
8783

Symfony2 efficient displaying list of categories and related products

I've got object Category and Product relation (one-to-many). I want to display list of all categories and objects related to them. If I use:
7823

Only allow English characters/letters/numbers and a few special characters

My problem is that I am making a small search engine from scratch, but it gets messed up if I search in Russian/any other language besides English. I was hoping some one could give me a code with r...
4174

Add values to an array after isset()

I'm trying to add elements to an array after subsequent trials, but so far only one value is being added to the array. I've Googled and searched stackoverflow, and I seem to be getting only half the
6492

Zend Framework Database Transaction - Can't rollback

Alright, let me get this out of the way first. My question is similar to this:
4518

How can an HTML page extract parameters passed through a form?

My question is should I convert two html pages to php pages, so the called page can access its POSTed parameters, or is there a way for a called html (.html extension) page to access posted paramet...
8472

Trouble with $.post

I am trying to insert some values into an sql database.
4962

In PHP, how do I check if a function exists?

How can I check if the function my_function already exists in PHP?
2624

Alternative Web file explorer/Navigator

I've found this online file explorer called enCode eXplorer. It was just what I was looking for; a simple, clean, free, easy-to-edit system, completely made up of one php file. The only problem I h...
7933

What is the difference between CURLOPT_SSLKEY and CURLOPT_SSH_PRIVATE_KEYFILE?

I was looking at this question and, to try to find the mistake, went to the PHP manual where I seen those 2 options :
8657

Get itunes id from url

what is the best way to retrieve id from itunes app link?
2440

extract some html with preg_match

i use preg_mach for extract some html ( i try to use DOMDocument but i had some problem with new line )
174

Drupal overriding existing option list values

Currently entityreference do not support filtering (via views like references). I have to filter the returned result of option lists manually via hook_form_alter.
4794

MySQL- Unable to jump to row 0 on MySQL result index

I have got an old site that has recently been displaying an error which is weird as its been untouched for some time. I get the following:
1228

for loop with assignment in php

When I want to iterate an array I usually do:
8482

now(); and date(); function in code igniter give zeros result

So i want to insert current time to mysql database, this is my code :
6156

Show cumulative totals in new column

I am working on a simple flow statement where the user inputs +ve and -ve values and they are stored in a single table.
6806

Translating a Perl reference to OO PHP?

So I tripped across another oddity in translating the old developers Perl script into
3953

Regular Expression only allow alphanumeric plus other specific characters

With a PHP function I'm trying to create a RegEx string for preg_replace that will only allow alphanumeric characters plus ! @ # $ % & . ,
8969

TCPDF not formatting

I'm using an ajax call to print a pdf and email it to user, but the problem is that the data in the pdf is not formatted.
827

php - simpledb - can't get consistent read to work

I'm using AWS SimpleDB for my site, however if I udpate an attribute with something completely different, searching that property with either the new value or the old value are both returning the s...
6436

How to replace “{* foo *}” with nothing?

I want to replace all text what start with "{" and end with "}" including those "{" and "}". Text between them may be anything. =(
2954

How to do autorendering in Symfony

I'm guessing its just not done since I can't find any reference to this anywhere, even people asking without response. Although I'm hoping Symfony calls it something else.
7331

Get request host in PHP

I'm developing a website by Zend.
2476

How to ‘convert’ any given regex to a PHP `preg_match`-compatible regex?

Okay, this may be a dumb question, but I’m pretty new to regular expressions and I honestly have no idea how to do this.
8937

Regular Expression: Why am I getting matches here when I expect none?

I've a regular expression that's looking for 2-3 upper case letters, together, ending in T and beginning with P, M, C or E. The regular expression, executed in PHP, looks like this:
5210

Correct input values of strtotime

I want to convert a date by the following statement
2680

error while loading wordpress post using ID

I am trying to retrieve the content of a wordpress post using its ID:
8138

How to get data from multidimensional array by ommiting one column?

I am storing info in an array in a loop like that:
2972

Converting a querystring into an associative array

In PHP, I need a function to convert a querystring from an URL, say: http://example.com?key1=value1&key2=value2 into a PHP associative array : array ['key1' => 'value1', 'key2' => 'value2...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.