Jump to content

pdunn

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

pdunn's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. printing the information in the buffer. Maybe I'm wrong, maybe what is happening is that the beginning part is not beginning printed out because it is in HTML and HTML tags like <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <?php just doesn't get printed.  Well ... how do I print them.  Would this help in being able to eliminate the code inbetween the <?php ?> Thank you for any help, P
  2. Hello, I want to make a buffer ($buf) that holds my php file. I want to remove the <?php ... ?> section and just hold the html information. I THOUGHT I made a regular expression to do this. I have $buf = ereg_replace('/[<\?]\w[\?>]/','',$buf); I also used, $buf = ereg_replace('/<\?\w\?>/','',$buf); and it didn't work. I had notice that even before this section, $buf = fgets($fd) $buf = trim($buf); that $buf only holds a some of the materials, it doesn't hold <html> blah blah <title>Untitled Document</title> blah blah <?php 'partial php_blah' it holds the rest of php_blah. However, $buf = strip_tags($buf); $buf = ereg_replace('/&\w;/', '', $buf); does holds from "Untitled Document" to the end of the file, even the ending '?>'. Does anyone knows why and how do I get $buf to hold everything and the proper way to write "erase the information inbetween <? and ?>"? Thank you, PDunn
  3. Thank you, you were helpful in solving the problem.  Using empty($array) is inteligent and I should have thought of that (checking the whole array instead of just indices, especially since I knew that there were no indices). pdunn
  4. Hello I have a minor problem with radio buttons and arrays.  I need to get a "Yes" or a "No" from the user. I will use radio buttons just like in the rest of the site. Since these button values depends on the amount of people from the previous form, I have to use an array as the variable. If no information is typed in the second form and I try to verify, I get notices that say that "Notice: Uninitialized string offset: 2 in /home/web/test.php on line 768". That is because no information was written in the array. I get this message when using !isset(array($loop)) and I tried empty() (but that's nearly {less than} the same). array($loop) of uninitialized value will always give me that Notice. I did made a new discovery. Regardless how many items the array is SUPPOSED to have, if at least one is filled in, there is no error. What I meant by SUPPOSED is that if the amount of people is 20, the array should be of size 20. However, if the user only fills in the information for at least 1 person, then there will not be a notice about uninitialization string and my error checking works with isset(). However, if none is set, then the problem occurs with isset(), empty(), etc. Any call to array(index) will result in an error since nothing is inside of the array. But if one thing is inside of the error, then the index is simply not set. So, how do I see if anything is in an array? Without printing it out, but just checking. count(), this did not work, it gives the value of 1 and if one item is in the array count() give out 1. Thank you, pdunn
×
×
  • 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.