I made a mistake uninstalling Aptana PHP as I didn't know PDT would suck as much...It's unable to accept my theme color files for PHP docs.
I know it's not a relevant question for this community, but I didn't know where else to go.
Please Help.
Thanks.
...
Does session_unset() unregister all the $_SESSION vars, or do you have to manually clear each variable registered into the $_SESSION array with unset() ?
I'm confused about this because the PHP documentation says:
Only use session_unset() for older deprecated code that does not use $_SESSION.
If $_SESSION is used, use unset() ...
In the codeigniter manual writes the following.
$this->db->select() accepts an
optional second parameter. If you set
it to FALSE, CodeIgniter will not try
to protect your field or table names
with backticks. This is useful if you
need a compound select statement.
$this->db->select('(SELECT SUM(payments.amount) FROM paym...
As strange as I find this, I have not been able to find a good PHP function anywhere which will do an intelligent parse of a user agent string? Googled it for about 20 minutes now.
I have the string already, I just need something that will chop it up and give me at least browser/ver/os.
Know of a good snippet anywhere?
...
How do I implement a PHP Socket Server, I am using PHP5.
Is there a ready made framework already available for me to use instead of going into the nitty gritties of the implementation details?
Basically I want to serve Flash clients using this Socket Server and this would be running in an Apache Environment.
This is the first time I am...
I'm developing my first decent-sized PHP site, and I'm a bit confused about what the "right way" (assuming there ever is such a thing) to handle clean/friendly/pretty URLs in the application.
The way I see it, there are two main options (I'll use a simplified social news site as an example):
1. Use mod_rewrite to handle all potential U...
how to insert special character like registered symbol ® or Copyright sign or Trademark symbol in database and also want to show on html page
what i have to do in both side (front end and back end), please elaborate
which function is more effective
Method 1
$_GET = array_map('trim', $_GET);
$_POST = array_map('trim', $_POST)...
I have a form where i have many music genres. An artist can be singing under many genres. I have put the genres in checkboxes. Now i need to store the values of the checkboxes in to a single field.
Can some one help me out with some code snippet as i am new to php programming?
...
"I would prefer it to be written in PHP or Java (I know PHP can't do multiple threads, but it could be accomplished with multiple processes)".
What does this statement mean when it says "multiple processes"? Are there any good examples out there?
...
Hi,
I'm expecting an issue with the PHP function fwrite()
$filename = 'rss.xml';
if (file_exists($filename)) {
echo "The file $filename exists";
}
if (is_writable($filename)) {
$fp = fopen($filename, 'w');
fwrite($fp, $feed);
fclose($fp);
}
else{
echo '<br />not writable..';
if(!is_readable($filename)){
...
I have a function on my site where people can vote on photos. Everytime someone click the vote-button my script adds a row in a table (mysql).
Each row looks like this: (Table name = likes)
id --------- userId --------- photoName --------- date
1 ----------- 21 -------------- 34234 ----------- 20100101
How do i find the top 10 photo...
Hello,
i want two arrays first one of all subjects and the second of all degrees which study in all universities (all over the world)
But a big problem is that i dont know how many subjects and how many
degree are there.? (in all over the world)
I just want two array the remaining logic i have made already.
All subject array ...
when i write
input data: hel'l"lo
print_r($_POST) display hel\'\"lo
and when i use
if(get_magic_quotes_gpc()){
mysql_real_escape_string($_POST);
display
hel\\\'\\\"lo
now my quetion is that
"is it necessary to use mysql_real_escape_string? bcoz i think php automaticaaly add slashes in post varaiable?"
...
Hi erveryone,
I have 2 assoc. Arrays which have the same structure, but only one ID is identical. I need to add content to the MainArray from the IncludeArray everytime the specific ID is identical.
Here are a sample of the Arrays (MainArray could hold up to 100 or more items, the sample contains only a portion of the real content):
$...
Hello everybody, I'm trying to build an autocomplete using jquery plugin autocomplete from this site.
Now I managed to achieve autocomplete using local results pre-loaded into website as a part of document ready function, its quite easy doing it localy.
Here is with what I struggle with, pulling results from php file. Here is how I tr...
I have a 10 digit string being passed to me, and I want to verify that it is a valid ASIN before doing more processing and/or redirection.
I know that a non ISBN ASIN will always be non-numeric and 10 characters in length
I just want to be able to tell if the item being passed is a valid ASIN or is it just a search string after I have ...
Hai guys,
Can someone help me to pass this json data to jquery automplete plugin... As i am a newbie to jquery i dont how to do it...
[{"0":"1","id":"1","1":"Albania","country":"Albania"},
{"0":"2","id":"2","1":"Algeria","country":"Algeria`"},
{"0":"3","id":"3","1":"Angola","country":"Angola"},
{"0":"4","id":"4","1":"Anguilla","coun...
In php I need to Load a file and get all of the words and echo the word and the number of times each word shows up in the text,
(I also need them to show up in descending order most used words on top) ★✩
...
I'm planning to sync 2 folders from 2 dyfferent servers using a cronjob scheduled to run every hour.
The script that is to be scheduled will check if a previous instance is already running, and if not, continue with processing.
so, the first stage is to sync these folders. Daily (or more often), the second server will have 1-2 thousands...
Hi,
I'm retrieving some hierarchical data from an Oracle database using the "connect by" function.
Then I populate a PHP array with the result of my query looking like:
while ($row_branches = oci_fetch_array($query_tree)) {
$tree[] = array(
'id' => $row_branches['ID']
, 'parent' => $row_branche['PARENT']
, 'data' => htm...