XtremeTeam Posted October 1, 2006 Share Posted October 1, 2006 Can someone please tell me what is wrong with the code below? It gives me a T_String Error. ---------------$randimnumr = rand(0,count($rarray1)-1);print $rarray[$randimnum];--------------- Quote Link to comment https://forums.phpfreaks.com/topic/22695-t_string-error-please-help/ Share on other sites More sharing options...
HuggieBear Posted October 1, 2006 Share Posted October 1, 2006 For starters, your variable is called $randimnum[color=red][b]r[/b][/color] and you refer to it as $randimnum (note the missing r off the end).RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/22695-t_string-error-please-help/#findComment-102038 Share on other sites More sharing options...
AndyB Posted October 1, 2006 Share Posted October 1, 2006 The (other) error is caused by lines before those you posted. Show us some code, say 8-10 lines ending with those two. Quote Link to comment https://forums.phpfreaks.com/topic/22695-t_string-error-please-help/#findComment-102042 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.