Category : php

When the page is redirected, the language I chose in the box does not appear. At first, whatever is available is chosen. here is what I want to do: change option data <select id=’lang’ class=’btn btn-xs btn-primary icons-select2′> <?php $query_lang=mysqli_query($con, "SELECT * FROM tb_lang"); while($lang = mysqli_fetch_assoc($query_lang)){ if ($lang[‘durum’]==1)} ?> <option value = "<?php echo ..

Read more

im using symfony and i keep getting this error Argument 1 passed to DoctrineBundleDoctrineBundleDataCollectorDoctrineDataCollector::__construct() must implement interface DoctrinePersistenceManagerRegistry, instance of DoctrineBundleDoctrineBundleRegistry given, called in /home/e1759631/public_html/TP1/var/cache/dev/ContainerKm4PF6B/App_KernelDevDebugContainer.php on line 890 any idea of what to do? Sourc..

Read more

So, i’m developing a website that display products and compare them, in this case computers, this products are displayed in the index page and their info are from a database. My main problem in the comparison system is how to send a id by selecting a product, how can i select the product to store ..

Read more

Running a simple search query, which feeds into an android studio textview. When I first managed to display results via .php site, all special characters ([{]}) were on show, but i added this line to remove: echo json_encode($resultArray, DEFINED(‘JSON_INVALID_UTF8_IGNORE’) ? JSON_INVALID_UTF8_IGNORE : 0); However, this now means that the results that show are also missing ..

Read more

I have numbers which are structured like that: 65280 and -16711936. They´re representing hex/ rgb colors. Now I´m trying to convert these numbers in hex like that: $hex1 = dechex(65280); // output: ff00 $hex2 = dechex(-16711936); // output: ffffffffff00ff00 The output of $hex1 is correct, but the output of $hex2 should be FF00FF. How can ..

Read more

The first $variablename needs to be the variables actual name, not its value. <?php $name = "Bob"; $stringVar = "$name"; $age = "17"; $intVar = "$age"; $atarRequired = 69.45; $floatVar = "$atarRequired"; $atarAchieved = true; $boolVar = "$atarAchieved"; $courseSelected = NULL; $nullVar = "$courseSelected"; echo($stringVar "is of" gettype($name) "data type, and its value is" $name); ..

Read more