Shadowing Posted December 22, 2011 Share Posted December 22, 2011 I tried everything to make this work hopefully someone can help me out <?php $new = date('m/d/Y/H:i:s', strtotime()$send1['time_offset']); ?> I also tried turning it into a variable $offset = $send1['time_offset']; and using <?php $new = date('m/d/Y/H:i:s', strtotime()$offset); ?> Quote Link to comment https://forums.phpfreaks.com/topic/253648-syntax-error-help-please/ Share on other sites More sharing options...
Pikachu2000 Posted December 22, 2011 Share Posted December 22, 2011 Look at the parentheses. Quote Link to comment https://forums.phpfreaks.com/topic/253648-syntax-error-help-please/#findComment-1300340 Share on other sites More sharing options...
Shadowing Posted December 22, 2011 Author Share Posted December 22, 2011 yah sorry i made a mistake when I posted i tried both of these Parse error: syntax error, unexpected T_VARIABLE <?php $new = date('m/d/Y/H:i:s', strtotime()$send1['time_offset']); ?> <?php $new = date('m/d/Y/H:i:s', strtotime()$offset); ?> Quote Link to comment https://forums.phpfreaks.com/topic/253648-syntax-error-help-please/#findComment-1300343 Share on other sites More sharing options...
Pikachu2000 Posted December 22, 2011 Share Posted December 22, 2011 The problem is still your parentheses. Quote Link to comment https://forums.phpfreaks.com/topic/253648-syntax-error-help-please/#findComment-1300353 Share on other sites More sharing options...
Shadowing Posted December 22, 2011 Author Share Posted December 22, 2011 $new = date('m/d/Y/H:i:s', time()+$send1['time_offset']); adding a + to it fixed my problem I dont see the parentheses error you dont mean this do you? cause it doesnt read the offset this way <?php $new = date('m/d/Y/H:i:s', strtotime($send1['time_offset'])); ?> Quote Link to comment https://forums.phpfreaks.com/topic/253648-syntax-error-help-please/#findComment-1300358 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.