Jump to content

Declaring Variables To Display In Body?


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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...