Jump to content

Recommended Posts

Posted (edited)

Hello - Total newbie here. 

I'm using the Profields module to make a table for settings. I would like for one row to contain a "copyright date" with a corresponding integer value according to https://processwire.com/talk/topic/8373-use-delimited-texarea-table-or-yaml-for-settings/

I have this code (courtesy of @Macrura

$copyYear = 2015; // Set your website start date
$curYear = date('Y'); // Keeps the second year updated
echo $copyYear . (($copyYear != $curYear) ? '-' . $curYear : '');
 
I want to set the value for $copyYear in a text field. Will it be parsed as an integer?
 
 

Thanks!!

Edited by LostKobrakai
Added codeblock

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...