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?
Hi experts,
we have an old large application that was not built on any framework. However now we want to transfer it to a php framework. Its a new area for us so we are not sure what it takes to transfer the older application to a framework like Zend?
Any help will be appreciated.
thanks
Hi Guys,
I have a bit of php code like this:
$test = "<!--my comment goes here--> Hello World";
Now i want to strip the whole html comment from the string, i know i need to use preg_replace, but now sure on the regex to go in there.
Can anybody help?
Thanks
I have a form that posts to a page. I want to display an image if the value of the item posted equals "paypal".
I need to write something that says;
if $_POST['method'] equals "paypal" then show paypal.gif
if $_POST['method'] equals "mastercard" then show mastercard.gif
I hope I made a bit of sense, new to php trying to learn the best I can
hai
I have a Spanish site in php. In this a mail body contain a subject "Solicitud de cotización" but the subject appears in hot mailbox like Solicitud de cotización?. But it's appear correct in mail section. How I avoid this problem. Does any one know this?
This command add the text "flower" to the image:
convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg
I'm using ImageMagick 2.2.0. I'm running it from PHP using:
system('convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower'…
hi,
similiar like this example, http://stackoverflow.com/questions/1336672/php-remove-brackets-contents-from-a-string i have no idea to replace
$str = '(ABC)some text'
into
$str = 'ABC';
currently use $str = preg_replace('/(.)/','',$str); but not works. how to fix this?
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!
This is kind of an academic question, so feel free to exit now. I've had a dig through Stack for threads pertaining to URL/Controller mapping in MVC frameworks - in particular this one:
http://stackoverflow.com/questions/125677/php-application-url-routing
So far, I can ascertain two practices:
1: dynamic…
I'm looking for a way to use the php number_format function or something similar that will add the thousand seperator but will leave any decimal part of the number intatct without and formatting of this. For example:
39845.25843 = 39,845.25843
347346.8 = 347,346.8
1000000 = 1,000,000
Thanks
Hello Everyone,
I am trying to build a dynamically generated unordered list in the following format using PHP. I am using CodeIgniter but it can just be normal php.
This is the end output I need to achieve.
<ul id="categories" class="menu">
<li rel="1">
Arts & Humanities
…
Example current URL http://www.domain.com/subdomain/install/finish.php
I use this code to get the current URL.
$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
Now I want to get the URL…
Hi,
I have a sign up page written in php, that goes to a confirmation page after processing. In the confirmation/ thank you page there is a 3rd party script that counts the number of successful registrants. how would I limit the script to be loaded per successful registration?
Hi,
I have a array inside my PHP app that looks like this:
Array
(
[0] => Array
(
[name] => Name1
[language] => 1
)
[1] => Array
(
[name] => Name2
[language] => 1
)
)
How can I check…
Most of "multi-platform" CI tools I've seen are in the Java/.NET world, like TeamCity or Hudson. Is there a continuous integration tool that can handle both PHP and Rails projects?
Hello,
I'm trying to learn to use PHP with an object oriented scheme. I think I understand the concept but I need real example, a forum exactly.
I know PhpBB but it's maybe too complicated to fully understand it so I'm looking for something simpler but still in object oriented.
Thank you
parse error occured in my php script. this is the line in which the error was occured.
photos[$i]="base_url().'uploads/'.$productdata2[$i]->image";
help me please......
Hello,
how could I add an autocomplete for PHP build-in functions like htmlentities or var_dump?
The autocompleter work for my classes but there's not autocompletion for functions like mentioned above.
I have a PHP script that keeps running in the background endlessly. It also keeps flush()ing debug messages. Is there a way to display those flushed messages within another HTML page?
sometext( [key] = value which content number and alphabates )
from above,i want only value part by using explode function for only one time.Is it possible.
or any other function is present in php.
hi
i am having a link like below
<a href="#" onclick="window.open('http://www.twitter.com/home?status=Reading+Facebook share, Yahoo Buzz and Tweet this buttons for Blogger blogs+http://www.didiknow.com');">Tweet this</a>
i want to insert a php variable value inside for…
Hi everybody,
I have built a secured login backend that controls if a user is logged in or not. If not, the user is redirected to a login page.
I would like to make a PHP function that iterates through a number of set url:s (array with url:s) to see if they are redirected or not. How could…
Hello.
I got a script that create a new database, now I need to fill that database with tables and values (from a MySQL dump file).
I'm using PHP - Doctrine 1.2.
Here is how I create the database:
$manager = Doctrine_Manager::getInstance();
$newConn =…