How can you add two numbers in PHP?

How can you add two numbers in PHP? That depends on how big your two numbers are. If you have numbers in the normal integer/double range, it is sufficient to use the “+” operator. You use it as follows: echo 1 + 2; // write “3” in the output If the numbers get bigger, you will have to use the …

Which PHP framework would you recommend?

In my opinion, Laravel and Symfony too. But everything depends on the requirement profile and personal needs, on the development environment. Laravel is one of the most popular and increasingly popular frameworks of 2017. And by the way, the open source “Eco-System” – under “Laravel” a number of products like Laravel Envoyer, Forge, Spark, Homestead and other services are collected. …

What makes Linux better than Windows?

  Linux is no better than Windows. Windows is no better than Linux. Such sweeping statements are simply pointless. I had hoped that someone would mention that in the answers. Linux is better in the following cases: 1. if you run a (web) server. Because of the great security features (among others). 2. if you have old hardware. Because it …

[PHP] Return the amount of times a number occurs in an array

This exercise is about creating a function that can return the amount of times a number occurs in an array. $zahlen1 = array(4,4,3,5,6,7,4,4); $zahlen2 = array(1,2,6,6,3,4,5,5,5,6,7,8,6,9); $zahlen = $zahlen2; echo longestrow($zahlen); function longestrow($zahlen){ $amount = 0; $flag = 0; foreach ($zahlen as $value) { foreach ($zahlen as $value2) { if ($value === $value2) { $amount++; if ($amount > $flag) { …