Cotton Rohrscheib

The Cotton Club Blog & Podcast

  • Home
  • About
    • Timeline
  • Blog
    • Faith & Family
    • Marketing & Tech
    • Farm & Business
    • Entertainment
    • Health & Wellness
    • Urban Farming
    • Weekend Projects
  • Podcast
  • Newsletter
  • Media
    • Photo Galleries
    • Video Archives
  • Marketplace
    • Accoutrements
    • Poshmark
    • Artwork
    • Banknotes & Currency
      • Currency
      • Gold Banknotes
      • Silver Certificates
    • Rare Books
    • Rare Coins
      • Coin Sets
      • Individual Coins
    • Stock Certificates
    • Trading Cards
      • Trading Cards: Autographs
      • Trading Cards: Base
      • Trading Cards: Graded
      • Trading Cards: Raw
      • Trading Cards: Sets
    • Vintage Toys
      • Buddy L
      • Ertl Farm Toys
      • GI Joe
      • He-Man
      • Hot Wheels
      • Lionel Trains
      • Lunch Boxes
      • Marx Toys
      • NASCAR Die-Cast
      • Schleich Toys
      • Star Wars
      • Tonka Trucks
  • Connect
You are here: Home / Marketing & Tech / PHPR / Smarty templates

PHPR / Smarty templates

April 8, 2008 by Cotton Rohrscheib Leave a Comment

Smarty Templates have been around for a while now and are pretty popular with developers.  One of the things that I really like about PHPR (PHPRUNNER) is that it utilizes Smarty Templates and stores them in a directory called <templates> inside of whatever application you are working in.  Let’s say we are working on a list page, with Smarty in use there are actually two separate files in play, one file will be called list.php and it will look something like this:

   1: include('Smarty.class.php');
   2:  
   3: // create object
   4: $smarty = new Smarty;
   5:  
   6: // assign some content. This would typically come from
   7: // a database or other source, but we'll use static
   8: // values for the purpose of this example.
   9: $smarty->assign('name', 'george smith');
  10: $smarty->assign('address', '45th & Harris');
  11:  
  12: // display it
  13: $smarty->display('list.htm');

As you can see, the list.php page just contains your actual PHP Code itself.  The second file in this equation is located inside of the <templates> directory and is called list.htm.  It contains the html and css values for the page:

   1: <html>
   2: <head>
   3: <title>User Info</title>
   4: </head>
   5: <body>
   6:  
   7: User Information:<p>
   8:  
   9: Name: {$name}<br>
  10: Address: {$address}<br>
  11:  
  12: </body>
  13: </html>

PHPRunner manual – Smarty templates

Filed Under: Marketing & Tech Tagged With: PHP Smarty, PHPRunner IDE, WYSIWYG

About Cotton Rohrscheib

The Cotton Club is a monthly podcast hosted by me, Cotton Rohrscheib. I'm a 52 year old entrepreneur w/ ADHD, OCD (and now AARP) that refuses to grow up as I grow old. I have collaborated and invested in hundreds of projects throughout my career in multiple industries such as; technology, healthcare, and agriculture. I also have 25 years experience in the marketing industry as a co-founder of an award-winning advertising agency. I will undoubtedly cover a wide variety of topics on my podcast while sharing some really crazy stories and situations that I've been fortunate to witness firsthand. I also have a book coming out in 2025 titled, "Mistakes were Made"

Leave a Reply Cancel reply

You must be logged in to post a comment.

  • Email
  • Facebook
  • Instagram
  • LinkedIn
  • Twitter

Recent Updates

  • Products Being Added…
  • Update on the “Cotton Exchange” Marketplace
  • My Review of Monarch Accounting
  • Getting a Late Start in the Garden
  • Online Marketplace Coming Soon!

Blog Categories

  • Blog (434)
  • Entertainment (378)
  • Faith & Family (155)
  • Farm & Business (300)
  • Health & Wellness (37)
  • Marketing & Tech (590)
  • Podcasts (32)
  • Urban Farming (23)
  • Weekend Projects (7)

Blog Archives

Join the Cotton Club!

 

Content Copyright © 2000-2026
Cotton Rohrscheib | Rohrscheib Capital
Disclaimer | Privacy Policy | Account Manager | View Cart

All opinions expressed on this website are 100% Cotton (see my disclaimer). All content, including text, images, and media, are the intellectual property of Rohrscheib Capital unless otherwise noted. To learn how we use your private information, checkout our privacy policy.