Jump to content

Declaring Variables To Display In Body?


mboehler3

Recommended Posts

I am new to PHP and ASP, and in working with ASP, I found that you can insert <% dim %> at the beginning of the page to set a variable. For example, I am creating 50 pages of payroll content for each state. At the top of each individual page, I have this code:

<% dim currentstate 	currentstate = "Maryland" %>

And when I want to call the state name, I insert this code:

<%=currentstate %>

which outputs "Maryland"This is great, but now I want to do the same thing with PHP. I've been looking around the internet and everything I come across is very elaborate. Shouldn't there be a simple answer?Thank you for your help!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...