Jump to content

joquius

Members
  • Posts

    319
  • Joined

  • Last visited

Everything posted by joquius

  1. Never used wordwrap() but what I'd usually do is preg_replace ("/(\w{5})/", "\\1\<br\/\>", $textrowwhatever);
  2. Please show the code of which you speak. If you're reading a file with a function which outputs an array of lines this could be the issue with what I am assuming was a different function. Are you trying to parse a file? Could you be more specific as to your goal or where exactley the <br_ />'s need to go. In the mean time maybe check preg_replace() on php.net or preg_split() maybe they are what you're looking for.
  3. Yeah looks like you're having some trouble with that margin-top. You can always just replace that with position: relative; top: 10px;
  4. Ok I have the following issue: I have a certain, table  ::), in which when you click on a row, which has for the sake of the example 7 columns, that row is changed to display: none; and an expanded row replaces it by setting it's display to block (JS of course). Now the problem is that when I use this in IE6 it works  :o. Hurray IE. But in FF what happens is that the replacement row only fills the first column of the table (out of 7). Then when the old row is displayed again (in the same page load) it also fills only the first column. I guess this must just be some FF issue in rendering rows after the table has already been rendered, but seeing as it works in IE6 I was wondering if any of you know of a work around? If not I would appreciate it if you could tell me what you normally do to get an expandable row (with JS).
  5. cheers  ;) That actually works.
  6. Being a bit lazy with this, but I have the following issue. Here's the code first: [code] div { position: absolute; left: 15px; top: 9px; font-size: 9pt; } div a { outline: 0; margin: 0; padding: 3px 10px 3px 10px; border: 1px solid #fcfcfc; background: transparent; } div a:hover { border: 1px solid #e0e0e9; color: #607090; background: #f0f3f9; } [/code] That's the css (removed classes), here's the html it's working with: <div> <a href="?link">link< / a> </div> Simple as anything. The problem is that it looks ok in firefox (get a box when hovering), but in IE6 I get this ugly cutoff box, which seems to have the side padding and border ok, but the top and bottom parts have been cut down to the "link" text. Any ideas?  ??? btw: haven't been here for a while, but the forum looks much better, good job.
  7. RTFM...there are tons of tutorials on this site..
  8. because on each while() loop you're replacing the data, why is the echo outside the loop? "/* ******** SELECT ROWS AND SET THEM AS VARIABLES FOR LATER USE ******** */" You\re just overwriting the variables
  9. uhh <a href="?dir=php/otherdocs/&file=otherpage.php">otherpage.php</a> then get the file and dir using $_GET on the page and then use these to get the specified file
  10. why so many {} you don't need them. They're only for $var{$string} <a href='tracks.php?cd_id={$cd3['cd_id']}&tracks&cd_title={$cd3['cd_title']}'>Tracks</a> Is this in html or in an echo? if it's in html ?><a href="tracks.php?cd_id=<?=$cd3['cd_id']?>&tracks&cd_title=<?=$cd3['cd_title']?>">Tracks</a><? In any case this line: $cdl = @mysql_query("select * from cds where cd_id={$_GET['cd_id']}"); will not work if $_GET['cd_id'] is not set so you should have an if() statement around it to provent issues
  11. we don't know what the session code is though. Are you using $_SESSION variables, or a DB? Or both?
  12. sql = "INSERT INTO `table` (`field_1`) VALUES ('$field_1')";
  13. no no not a solution just wondering what'll happen, perhaps $item is overwriting the keys
  14. have u checked the result of $item->color? I suppose you have. The only other thing I can think of just for curiosity is to set $aList = array([ofoo] => $oFoo,[obar] => $oBar,[ozar] => $oZar);
  15. how about taking away $list=array(); seeing as you'll be defining the keys anyway
  16. I know but there's no movement on it.
  17. [!--quoteo(post=384800:date=Jun 16 2006, 11:48 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Jun 16 2006, 11:48 PM) [snapback]384800[/snapback][/div][div class=\'quotemain\'][!--quotec--] Use the file() function to read the text file into an array (now you'll know which line is which) so you can echo the index value for lines which match your condition. [/quote] yes you're right my mistake...file not fread. if you want to know what line it's in... $file = file ("file.txt"); foreach ($file as $line => $text) { if (preg_match ("/1234/", $text)) $line_with_str = $line; }
  18. try echoing the query $sql = "SELECT * FROM accounts WHERE id='$id'"; $result = mysql_query($sql) or die (mysql_error ()."<br>"sql: ".$sql); do this and get the error and query
  19. $file = fread("file.txt"); $key = search_array ("1234", $file); // key representing the line.. that'll only get it if the line is only "1234"
  20. $list[$item->color] = array(); you have only defined $list as an array you need one for each key value this should fix it
  21. for ($i=1; $i<=$model; $i++) { echo "<option value=$i>$i"; }
  22. change the code to thiis [code] $sql = ""; // your sql here $result = mysql_query ($sql) or die (mysql_error ()); $num = 0; while ($data = mysql_fetch_array ($result)) {   // loop   if ($num == 5) echo "</td><td>";   $num++; } [/code]
  23. no, include does not load the page it just inserts the code for processing on the same page, but if the $_GET was set in the page holding the include(); function it would affect the included file in the same manner
  24. where do you want to "stop" it? explain what your actual goal is
  25. I'd say go to the freelancing forum
×
×
  • 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.