Jump to content

Help with array...


pro_se

Recommended Posts

Hello all, I have not posted here in a while...

I keep getting this error: Parse error: syntax error, unexpected ',' in /home/*hidden*/*from*/*you*/includes/functions_base.inc.php on line 843

with this code...

[code] <?php
function int2folderperm ($int)
{
  $int & FOLDER_FRIEND_ACCESS;
  $int & FOLDER_FAMILY_ACCESS;
return array ('friend' => (int), 'family' => (int));  //line 843
  } ?>
[/code]

any suggestions?
Link to comment
https://forums.phpfreaks.com/topic/33049-help-with-array/
Share on other sites

I'm not really sure what you're trying to accomplish here.  But the reason you're getting the unexpected ',' error is because you are using the cast operator "(int)" with no parameter.  Maybe you meant to do this?

[code]
<?php
function int2folderperm ($int)
{
  $foo = $int & FOLDER_FRIEND_ACCESS;
  $bar = $int & FOLDER_FAMILY_ACCESS;
return array ('friend' => (int)$foo, 'family' => (int)$bar);  //line 843
  } ?>
[/code]

Best,

Patrick
Link to comment
https://forums.phpfreaks.com/topic/33049-help-with-array/#findComment-153978
Share on other sites

thanks, that got rid of the error but now its not showing what file is public and what file is private... i am using uploader v6.3 and that segment/ function of code is used to convert the integer into a string for example it would convert 1 to public.. how would that work with this particular function..??
Link to comment
https://forums.phpfreaks.com/topic/33049-help-with-array/#findComment-154054
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.