Skip to content
Advertisement

String and number in for each

I have this code:

JavaScript

Expected result (to put as text in another PHP file):
$Avroeger = 8.8;
$Bvroeger = 5.5;

Actual result: (where the 8.3 and 5.7 are the old values of $Avroeger and $Bvroeger)
8.3 = 8.8;
5.7 = 5.5;

Anyone who can help? Thank you in advance!

Advertisement

Answer

You are doing the appending wrong. Do it as shown below.

JavaScript

Demo

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement