/    Sign up×
Community /Pin to ProfileBookmark

Is This Code Php Or Javascript ?

Folks,

Tutorial says this is php script but it looks like javascript:

[code]
echo ‘<script>alert(“Welcome to Geeks for Geeks”)</script>’;
[/code]

https://www.geeksforgeeks.org/how-to-pop-an-alert-message-box-using-php/

Can you confirm ?

This is not php tag, is it ?
**<script></script>**

Cheers!

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogApr 11.2021 — It is PHP (presumably) that is using echo to output some text. The text in this case happens to be a HTML script tag which will then executed some JavaScript within the browser.
Copy linkTweet thisAlerts:
@developer_webauthorApr 14.2021 — @NogDog#1630222

Thanks.

I didn't know <script> tag was html. Maybe html 5.

So they mixed php, html and Javascript, did they ? And it was supposed to be a php tutorial. I hate Javascript.
×

Success!

Help @developer_web spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.11,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...