Skip to content

Tag: php

How to calculate two data in one array?

I’m a beginner in php, I want to calculate two data from one array, but I still don’t understand how. For example, I have one data array $array = (1,2,3,4); and I want the output like this 1×2 = 2 …

Script html php

In the script below, I currently have a fixed value in the array of $out variable. Example: $out[1]. What I need is for this fixed value (in this case 1), to be replaced by the str value of the …

Use $I++ more than once in a loop

I need to use the value for $i++ in numerous places but if I do that then some fields end up skipping values and instead of being 1, 2, 3 etc. they are 1, 3, 5 and the other field has values of 2, 4, …