unusual ternary operation?

I was asked to perform this operation of ternary operator use: $test='one'; echo $test == 'one' ? 'one' : $test == 'two' ? 'two' : 'three'; Which prints two (checked using php). I am still... more


Where is my php.ini file located on the server?

A few years ago I installed Apache 2.2x and PHP 5.3.1 on a Linux server I maintain. I used .tar.gz's and built them as instructed (instead of rpms and what-have-you). And all was fine. Today I... more


How to determine the first and last iteration in a foreach loop?

The question is simple. I have a `foreach` loop in my code: foreach($array as $element) { //code } In this loop, I want to react differently when we are in first or last iteration. How... more


How do MySQL and Microsoft Access differ?



Duplicate row based in column value?

Please I need to duplicate row when having multiple values in one column. Exemple : A B 12 I76J-I76H=> A B 12 I76J A B 12 I76H Thank you .


How do I update if exists, insert if not (AKA "upsert" or "merge") in MySQL?

Is there an easy way to `INSERT` a row when it does not exist, or to `UPDATE` if it exists, using one MySQL query?


What are the best books for database management systems?

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.