I'm interested in this field,but I'm only familiar with PHP so far.
If not,can you recommend a tiny but not so bad project that's easy enough to learn?
I'm running my own (albeit, basic) benchmarks in a linux-based sandbox. However, I'd love to find a per-function or per-task performance / benchmark reference or utility for comparison.
Does this exist?
Of course I've done my own fair diligence / searching and have so far come up empty handed..
(I'm primarily interested in information relevant to PHP 5.3)
Thanks very much! :)
My classifieds website uses mainly PHP and MySql.
On error, (for example if a variable isn't found), I would like to have an error-page to show, is this possible? And I mean for every error to point to the same error-page.
I am thinking about htaccess, but maybe there are other ways also?
Same with MySql, how is it done there?
Thanks
is there a built in function in php that would combine 2 strings into 1?
example: $string1 = abcde, $tring2 = cdefg
combine to get: abcdefg
if the exact overlapping sequence and the position are known, then it is possible to write a code to merge them.
TIA
I'm looking for a "SINGLE INSTALLER" solution for PHP Development.
Is there anything out there which will give me a nice IDE, Web Server, Debugger, Database, etc, on a single install image (*.msi or *.exe)?
This of course would be completely opposite of Eclipse PDT, which requires you to search and locate a bunch of additional components which never quite work together.
How do you open a textfile and write to it with php appendstyle
textFile.txt
//caught these variables
$var1 = $_POST['string1'];
$var2 = $_POST['string2'];
$var3 = $_POST['string3'];
$handle = fopen("textFile.txt", "w");
fwrite = ("%s %s %s\n", $var1, $var2, $var3, handle);//not the way to append to textfile
fclose($handle);
Iam a little bit confused by php function declare.
What exactly is an single tick, i thought 1 tick = one line of code?
But if i use:
function myfunc() {
print "Tick";
}
register_tick_function("myfunc");
declare(ticks=1) {
echo 'foo!bar';
}
The script prints :
"Tick" 2 Times??
I am trying to echo a result from xml into my html code form expedia. But I ran into a problem. There text is a little messed up:
<areaInformation>
Distances are calculated in a straight line from the property's location to the point of interest or attraction, and may not reflect actual travel distance. <br /><br /> Distances are displayed to the nearest 0.1 mile and kilometre. <p>La Isla Shopping Mall - 0.5 km / 0.3 mi <br />Yamil Lu'um - 0.5 km / 0.3 mi <br />Acuario Interactivo - 0.6 km / 0.3 mi <br />Luxury Avenue - 1.5 km / 0.9 mi <br />Cancun Golf Club at Pok Ta Pok - 2.2 km / 1.3 mi <br />Nautilus Diving and Training Center - 2.6 km / 1.6 mi <br />Cancun Convention Center - 2.8 km / 1.7 mi <br />Plaza Caracol - 2.8 km / 1.8 mi <br />Playa Tortuga - 3.1 km / 1.9 mi <br />Aquaworld - 3.6 km / 2.2 mi <br />Playa Langosta - 4.1 km / 2.6 mi <br />Museo de Arte Popular Mexicano - 4.6 km / 2.9 mi <br />Playa Linda - 5 km / 3.1 mi <br />Playa Delfines - 6.1 km / 3.8 mi <br />El Rey Ruins - 6.2 km / 3.8 mi <br /></p><p>The preferred airport for ME Cancun - Complete ME All Inclusive is Cancun, Quintana Roo (CUN-Cancun Intl.) - 14.3 km / 8.9 mi. </p>
</areaInformation>
And I echo it in php:
<div id="hotelInfo"><?php echo $areaInfo ?></div>
And of course I get this in the browser window:
Distances are calculated in a straight line from the property's location to the point of interest or attraction, and may not reflect actual travel distance. <br /><br /> Distances are displayed to the nearest 0.1 mile and kilometre. <p>La Isla Shopping Mall - 0.5 km / 0.3 mi <br />Yamil Lu'um - 0.5 km / 0.3 mi <br />Acuario Interac
etc.
How can I fix this??? Any help would be greatly apreciated! Thanks!
i need in an php file three drop down boxes or multiple select boxes.
the entries from these boxes are in a mysql database.
the single problem is that the entries in the thrid box depend on the second, and the entries in the second depend on the first.
can someone help? know any examples?
hi
I've tried a few php IDEs , but still searching for the FASTEST one
all Java based IDEs are too slow, I have 2 computers to work, my home pc which is too fast, and my laptop witch is good , but cant handle a heave software.
and I have to work on them both, so I'm looking for the best free ide which is fast
I'm not talking about text-editors , because I already have np++ and its great, but looking for extra features to help me save time..
any tips?
Hi,
I am using group by ID WITH ROLLUP in my mysql query. The thing is I want to store these totals in a variable in php. Is there any way to do that?
Thanks.
$arr = array('superman','gossipgirl',...);
$text = 'arbitary stuff here...';
What I want to do is find the first/last occurencing index of each word in $arr within $text,how to do it efficiently in PHP?
Example array
$myArray[0] = array('23, null, 43, 12');
$myArray[1] = array('null, null, 53, 19');
$myArray[2] = array('12, 13, 14, null');
All nulls should be replaced with 0. I was hoping someone would have an efficient way of doing this, perhaps a built in PHP function that I am unaware of.
Hello,
We have a need to access a DB that only allows one connection at a time. This screams "singleton" to me. The catch of course is that the singleton connection will be exposed (either directly or indirectly) via a web-service (most probable a SOAP based web-service - located on a separate server from the calling app(s) ) - which means that there may be more than one app / instance attempting to connect to the singleton class.
In PHP, what is the best way to create a global singleton or a web-service singleton?
TIA
I wrote a html scraper to scrape my various social identites, so I can make a real time 'biography' website.
However after using php curl_exec, I find that texts that I have quoted, end up being formatted in a weird character set.
ex: "I love dogs" gets formatted to ’I love dogs ’
"I hate cheese" gets formatted to “I hate cheese�
How do I either scrub these characters, or set curl not to format quotes like this.
Also, I have turned off magic_quotes.
I have a PHP web application on an intranet that can extract the IP and host name of the current user on that page, but I was wondering if there is a way to get/extract their Active Directory/Windows username as well. Is this possible?
Traits have been one of the biggest additions for PHP 5.4. I know the synatax and understand the idea behind traits, like horizontal code re-usage for common stuff like logging, security, caching etc.
However, I still dont know yet how I would make use of traits in my projects.
Are there any open source projects that already use traits? Any good articles/reading material on how to structure architectures using traits?
I want to run this function but show the result in a table row
strlen($cat_row['sms']
This is what i came up with but it is not working:
echo "<tr><td bgcolor=#626E7A>".**strlen($cat_row['cars']**."</td></tr>";
How do you show result of a php function in a table row? i am trying to format the output some how.
please help
I am using php codeigniter and i am trying to import my contacts from my gmail and yahoomail exactly like twitter... I dont know how to get started? Any suggestion?
Which PHP framework should I choose between ZendFramework or YII?
Points I need to consider:
Performance (assuming an accelerator is used)
Documentation
stability of framework
less to code.
I have to build an application using Maven for PHP that has multiple modules.
The scenario in which the maven seems to not work is this: I have a common module and a client module depending on the first one.
When doing "mvn site" on the client module which depends on the common module, the test fails to see the paths to the common module. Is there a flow in my build or this is just not possible?
How to transfer json data to html with php?
$url="http://api.nytimes.com/svc/search/v1/article?format=json&query=usa&rank=newest&api-key=mykey"
when I type the url in browser, it return
{"offset" : "0" , "results" : [{"body" : "A guide to cultural and recreational goings-on in and around the Hudson Valley. ...}]}
how to put the json body data into html? I mean like this echo '<div class="body"></div>';