I dont know much about classes, but have a reasonable knowledge of PHP/MySQL.
But why should I learn classes? I know they are important but what benefits can I see using them that I cant with?
I'm looking for in-depth reference books / guides in PHP, MySQL, and Unix. I'm aware there other other questions pertaining to good books for short references of function names, or detailed beginner guides to these systems. I'm looking for something different. I want a book that I can either use as a quick but in-depth (decent write up, not a pocket reference guide) reference to common functions (JOINS, string manipulation, Regular Expressions, etc) while also providing a detailed inner workings explanation on the system itself.
Im writing a php script to compare the similarity of 2 strings. This works pretty good at the moment, but what I would like to do is match words when one is a synonym of the first.
Any thoughts?
Thanks for looking. All helpful answers/comments are up voted.
In php, you can use NOW() like this:
mysql_query("INSERT INTO tablename (id, value, time_created)
VALUES ('{$id}', '{$value}', NOW())");
How can I do the same thing in PDO. When I bind like this, I get an error:
$stmt->bindParam(':time_added', NOW(), PDO::PARAM_STR);
Is it the PDO:PARAM_STR?
What would the regex expression that would go into preg_split function to validate date in the format of
7-Mar-10 or how can I validate a date of format 7-Mar-10 in PHP
Thanks.
There has always been a confusion with preg_match in php.
I have a string like this:
apsd_01_03s_somedescription
apsd_02_04_somedescription
Can I use preg_match to strip off anything from 3rd underscore including the 3rd underscore.
thanks.
Hi I know about several PDF Generators for php (fpdf, dompdf, etc.)
What I want to know is about a parser.
For reasons beyond my control, certain information I need is only in a table inside a pdf
and I need to extract that table and convert it to an array.
Any suggestions?
how can I add more strings in this object with php.
I have managed to generate strings, but do not add more strings in an objects, nor remove the last comma.
like this:
Before,
{
"themes":[
{
"name": "Amelia",
"description": "Sweet and cheery.",
"thumbnail": "http://bootswatch.com/amelia/thumbnail.png"
}
]
}
After,
{
"themes":[
{
"name": "juan",
"description": "esto es un ejemplo.",
"thumbnail": "http://example.com"
},
{
"name": "juan2",
"description": "esto es un ejemplo2.",
"thumbnail": "http://example2.com"
},
]
}
Thanks and sorry for my english.
Which technology is better to use in terms of performance for high performance scalable web application? PHP or Python?
The project is going to involve database.
I'm trying to have an accurate Unix timestamp values for:
today,
this week,
this month,
this year
There are a few snags however:
- Today should be everything since last midnight
- This week should start on the last/this monday
- This month (should know if its 30/31 days or 28/29 days feb)
- This should be the very beginning of the current year up til now
I want to do this without mysql at all, purely in php as I need it as an accurate Unix timestamp to assign to a variable. Any Idea how these timestamps periods can be calculated?
I was wondering how can I grab the value from a hidden field using PHP?.
Here is the hidden field.
<input type="hidden" name="delete" value="' . $row['delete_id'] . '" />
I am new to Netbeans. Is it possible to work directly on the server files through sftp to avoid downloading/uploading each time. Will the intelisense work the same ?
If it is possible I can't find how to do that or what plug-in i need to use. And if it isn't what other free php IDE offers this option ?
Can any body have idea how to consume php soap web service that have no support wsdl.
I want to add reference in .Net to generate client but failed.
When i saw in browser with ?wsdl it shows message wsdl is not supported.
There is a way to check with a "IF" if a function fails in php?
Ex.
If (getimagesize($image) returns and error) {
echo 'Error: function dont work';
}
else
{
// do something
}
Thanks!
Hello,
I want to know how to echo a string that have a $ sign from a database. At this time, the value on database 'Buy one for $5.00' converts to 'Buy one for .00'.
Ex:- Field: title | Value: Buy one for $5.00
<?php
$row = mysql_fetch_array.....
$title = $row['title'];
echo $title;
?>
Thank you, pnm123
Hi, I need to know how I can replace the last "s" from a string with ""
Let's say I have a string like testers and the output should be tester.
It should just replace the last "s" and not every "s" in a string
how can I do that in PHP?
Hi,
I have a web on php5, iis6, and Oracle on windows server 2003.
I had Oracle 10.2.0.1.0 and deinstalled it. After that I installed earlier version (10.1.0) for cloning DB purposes, php doesn't work. As I understand it failes because of oci8.dll, but can't find the real problem.
Please, help.
In my application am submiting my form by using post for a php page.
<form method="post">
<select name="txtplace">
<option value="1">ajith</option>
</select>
</form>
here when i am try to get the value of my dropdown its only getting 1.How can i get ajith
Using PHP: How can I create an image to display an email address (to help reduce spam)?
Meaning, if I want to display "[email protected]" on my web page, since crawlers can easily find that text - I want to display the email address as an image that says "[email protected]".
How do I do that? I want the font to be:
color: #20c
font: 11px normal tahoma
Note: It is worth noting that the
mail() function is not suitable for
larger volumes of email in a loop.
This function opens and closes an SMTP
socket for each email, which is not
very efficient.
Source: PHP manual
What are larger volumes? A 100 or a 1000??
Can I safely make it loop 200 times without much problems? (I can't install pear)
Hello.
I am looking for a possibility to run a PHP + MySQL solution on a desktop.
Can Adobe AIR accomplish that for me?
Will the setup be able to access the COM port of the computer?
Is it possible using php's XMLWriter to insert a new node to an existing xml file, and then save the file. This would be much more benficial to me that actually creating a enw file every time i want to update an xml file.