Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Have problem with code for the news..undefined offset?

Asked Modified Viewed 1,803 times
S
StoyaN
S
StoyaN 10
  • Member, joined since
  • Contributed 162 posts on the community forums.
  • Started 37 threads in the forums
  • Started this discussions
asked
Member

Hi guys! This is the code:

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]$news_tags=$data['news_tags'];
if ($news_tags==""wink { echo "There are no tags."; } else {
$exploded_tags = explode(", ", $news_tags);
$i="1"; for ($z = 0; $i <= 5; $i++) {
if ($exploded_tags[$i] == ""wink {
break; }
echo "<a href='".BASEDIR."search.php?method=OR&fields=0&stext=".$exploded_tags[$i]."&stype=news&submit.x=24&submit.y=20' alt='' title='$exploded_tags[$i]'><span>$exploded_tags[$i]</span></a>, ";
}
}[/syntaxhighlighter]

In Errors section in my admin panel, It keeps telling me that there is Undefined offset: 4 on line 5. The code is working perfectly, but how i can remove this error?
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

S
S
StoyaN 10
  • Member, joined since
  • Contributed 162 posts on the community forums.
  • Started 37 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet