+ 2

Please check this code it is showing error plz fix it or tell me what and where is the problem in this code.

https://code.sololearn.com/w8Ct5S7kPP6v/?ref=app

19th Nov 2017, 6:26 AM
Arpan Kanwer
12 odpowiedzi
+ 3
Brother, the reason is because there was some invalid characters copied, those characters look like space but they are not, and PHP compiler see those characters as something annoying, the compiler doesn't know how to process the characters, and so the code fails to execute, can you understand what I mean bro? You also need to delete and type again the space between echo and $txt, $x and $y respectively. <?php $txt="Hello world"; $x=5; $y=10.5; // delete and type space again before $txt echo $txt; // delete and type space again before $x echo $x; // delete and type space again before $y echo $y; ?> Or you can try this too <?php $txt="Hello world"; $x=5; $y=10.5; echo "$txt<br />$x<br />$y"; ?> Remember to delete and type space again between echo and "$txt..."; Hth, cmiiw
19th Nov 2017, 9:36 AM
Ipang
+ 4
Bro, can you tell me what is your browser? I want to try using web SoloLearn too, to save my data usage, I used Opera Mini, but it doesn't work well with SoloLearn web, I'm looking for alternatives. I am using theAndroid app for now...
19th Nov 2017, 9:45 AM
Ipang
+ 3
Okay bro I understand, good luck and keep learning bro.. Cheers!
19th Nov 2017, 9:55 AM
Ipang
19th Nov 2017, 6:46 AM
Arvind Kumar
Arvind Kumar - avatar
+ 2
If you are using web browser there's a possibility that the code contains invalid characters when you pasted it, delete spaces in the assignments and calls to echo. $txt = "Hello world!" => $txt="Hello world!"; $x = 5; => $=5; Hth, cmiiw
19th Nov 2017, 9:08 AM
Ipang
+ 2
check now cleared all the spaces but noting happened. bro plz fix.
19th Nov 2017, 9:22 AM
Arpan Kanwer
+ 2
ohk but I am studying from w3schools site in chrome so I copied this code from that.
19th Nov 2017, 9:51 AM
Arpan Kanwer
+ 1
https://code.sololearn.com/w8Ct5S7kPP6v/?ref=app. but now check that code whats the problem now bro plz tell me I had fix it but then also it is giving error.
19th Nov 2017, 8:58 AM
Arpan Kanwer
+ 1
wait bro checking.
19th Nov 2017, 9:16 AM
Arpan Kanwer
+ 1
yeah bro when I write code my self it is working older code is copied from web but I don't understand why this had happened as the code is the same can u plz tell me whats tge reason behind or whats had happened
19th Nov 2017, 9:28 AM
Arpan Kanwer
+ 1
Hmmm bro I understand very clearly thx for this answer this is the best answer.
19th Nov 2017, 9:39 AM
Arpan Kanwer
+ 1
thx bro
19th Nov 2017, 10:01 AM
Arpan Kanwer