Jump to content

Recommended Posts

$title = str_replace( " ", "-", $row[title]);
								   $eno = str_replace( " ", "-", $row[eno]);
								   
while($row = mysql_fetch_array($result)){


echo "<table width='100%' border='0' bgcolor='#3B3B3B'>
  <tr>
    <th width='8%' rowspan='2' scope='col'><img src='$row[thumb]' alt='thumb' width='74' height='56' border='1'></th>
    <th width='92%' scope='col'><div align='left'><a href='http://janime.tv/{$row[page_id]}/{$title}/{$eno]}'>{$title} {$eno]}</a></div></th>
  </tr>
  <tr>
    <th scope='col'><div align='left'>watch anime</div></th>
  </tr>
</table>";
}

 

problem with this code is... for all the links only the latest row is used and replaced...

Link to comment
https://forums.phpfreaks.com/topic/202826-replace-spaces-with-hyphens/
Share on other sites

									   
while($row = mysql_fetch_array($result)){
$title = str_replace( " ", "-", $row[title]);
$eno = str_replace( " ", "-", $row[eno]);

echo "<table width='100%' border='0' bgcolor='#3B3B3B'>
  <tr>
    <th width='8%' rowspan='2' scope='col'><img src='$row[thumb]' alt='thumb' width='74' height='56' border='1'></th>
    <th width='92%' scope='col'><div align='left'><a href='http://janime.tv/{$row[page_id]}/{$title}/{$eno]}'>{$title} {$eno]}</a></div></th>
  </tr>
  <tr>
    <th scope='col'><div align='left'>watch anime</div></th>
  </tr>
</table>";
}

 

Try that

									   
while($row = mysql_fetch_array($result)){
$title = str_replace( " ", "-", $row[title]);
$eno = str_replace( " ", "-", $row[eno]);

echo "<table width='100%' border='0' bgcolor='#3B3B3B'>
  <tr>
    <th width='8%' rowspan='2' scope='col'><img src='$row[thumb]' alt='thumb' width='74' height='56' border='1'></th>
    <th width='92%' scope='col'><div align='left'><a href='http://janime.tv/{$row[page_id]}/{$title}/{$eno]}'>{$title} {$eno]}</a></div></th>
  </tr>
  <tr>
    <th scope='col'><div align='left'>watch anime</div></th>
  </tr>
</table>";
}

 

Try that

 

syntax error, unexpected ']', expecting '}'

  while($row = mysql_fetch_array($result)){
$title = str_replace( " ", "-", $row[title]);
$eno = str_replace( " ", "-", $row[eno]);

    echo "<table width='100%' border='0' bgcolor='#3B3B3B'>
  <tr>
    <th width='8%' rowspan='2' scope='col'><img src='$row[thumb]' alt='thumb' width='74' height='56' border='1'></th>
    <th width='92%' scope='col'><div align='left'><a href='http://janime.tv/{$row[page_id]}/{$title}/{$eno}'>{$title} {$eno}</a></div></th>
  </tr>
  <tr>
    <th scope='col'><div align='left'>watch anime</div></th>
  </tr>
</table>";
}

 

Try that

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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