LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-27-2014, 12:17 PM   #1
figure20012
Member
 
Registered: Apr 2012
Posts: 75

Rep: Reputation: Disabled
do not get <, > ,/ in php array loading a html ou javascript file


Hello

I cannot not get <, > ,/ in php array loading a html ou javascript file.
when I make the print_r($contents), do not get blank cells for the tags example (<script>)
==
<?php
foreach (glob("*.js") as $filename) {
$file = $filename;
$contents = file($file);
print_r($contents);
# $string = implode($contents);
$string = implode("<br>", $contents);
# echo $string;
echo "<br></br>";
}
?>
==

js code
==
<!DOCTYPE html>
<html>
<body>

<p>Click the button to wait 3 seconds, then alert "Hello".</p>
<button onclick="myFunction()">Try it</button>

<script>
function myFunction()
{
setTimeout(function(){alert("Hello")},3000);
}
</script>

</body>
</html>

==

result: blank array


Can you please help me?
Thanking you in advance.
 
  


Reply

Tags
array, javascript, php



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Comment Style: HTML, JavaScript, PHP, etc. tangoking Programming 7 12-13-2010 01:51 AM
PHP: Converting a PHP array into an HTML array koosha Programming 4 08-11-2009 08:47 AM
Javascript array to PHP using cookies problem climbingmerlin Programming 10 03-09-2006 10:06 AM
passing an array from html-forms to php prabhatsoni Linux - Software 2 06-04-2005 12:11 AM
HTML frames javascript php problem rblampain Programming 4 04-08-2005 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration