We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,417 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Really big HTML and Javascript to PHP variable

Hello, ths is one thing that is really shaking my heade O_o, I have got a Html and Javascript code, that contains about 1000 lines and I need to put it to php variable.
Sure I was thinking about the EOT method, But thare is one problem with it, if there is word function like in javascript is, it will take it like php function, and this will cause errors.
Any other Idea how to do it?

2
Contributors
2
Replies
11 Hours
Discussion Span
1 Year Ago
Last Updated
3
Views
Question
Answered
desup
Light Poster
25 posts since Jan 2012
Reputation Points: 10
Solved Threads: 5
Skill Endorsements: 0

You can use nowdoc syntax (requires PHP 5.3):

http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc

Please note that variables will not get parsed.

You could also use a heredoc syntax but I am really not sure whether function keyword gets parsed or not.

broj1
Nearly a Posting Virtuoso
1,212 posts since Jan 2011
Reputation Points: 167
Solved Threads: 164
Skill Endorsements: 13
Question Answered as of 1 Year Ago by broj1

Yes, I have already found a way using file_get_contents :) but thank you

desup
Light Poster
25 posts since Jan 2012
Reputation Points: 10
Solved Threads: 5
Skill Endorsements: 0

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0890 seconds using 2.66MB