Jump to content

Vince889

Members
  • Posts

    65
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Vince889's Achievements

Member

Member (2/5)

0

Reputation

  1. Christian, I just tried your suggestion and it still wraps. Any other ideas? DarkerAngel, I tried that and it outputted this: (see attached). Vince
  2. If you view this in IE 8 or even FF 3.6, this menu bar wraps and I cannot figure out why. I've debugged using Firebug and even using my plain ole' eyes. I can't find the issue. http://awt-gpi.com
  3. Hey guys, Why exactly do people use multiplication when calculating time? Like when setting cookies, timeouts or something that requires second-based definitions. For example, some do: $thirty_days = time()+60*60*24*30; As opposed to what I do: $thirty_days = time()+2592000; Why do they do that? Does it help them calculate it without a calculator? Make it easier to manage/adjust in the future? Personal preference? These are the only possible explanations I can think of. This has been bugging me for a while...am I doing something wrong?
  4. I am more of a programmer, rather than a designer. I'd much rather code and make the website do cool things, as opposed to make it look pretty. In short, I suck at designing. Could you guys please critique the following website? Its for an industrial company that sells printers and related equipment. http://3dprintingequipment.com/landing/ Being worked on: - An image rotator in the top-right corner of the screen. - The "Supplies" page. Please ignore this. I mainly want feedback on the landing page and the 'Products page'.
  5. Is there a way to dynamically create subdomains like so: http://sub.example.com ? I can do it in cPanel, but I'm not sure how I would go about doing it in PHP. I know how to create http://example.com/sub, but that isn't what I want. I don't think it would work the same as http://sub.example.com.. - Vince
  6. ....Your setup is fine, that is the messageboard putting those extra characters in.
  7. Again, I am not really sure about what you're looking for. When I parse that string, it comes out as <a href=&#039;test&#039;>Test</a> [just btw, PHPFreak's messageboard is adding its own stuff to our posts. For example, the extra "&#039;"]
  8. Regex would help, but if you want to use str_replace, thats fine. $string = "blahblah navigationID=44"; $replacement = "/en/content/3/Link_Name"; echo str_replace("navigationID=44",$replacement,$string); Atleast I think thats what you want...
  9. If I recall correctly, ENT_QUOTES doesn't do any besides tell the function how to handle double or single quotes [and decide whether or not to convert them]. If you're looking for some kind of special feature, then I don't believe this is what you're looking for.
  10. Would this be much more logical? <? echo "Hello, I am ".$name.""; ?> Or are they fairly the same?
  11. Hey PF. I'm trying to build some better coding habits, so what tips do you guys have? Of course there are obvious things such as well-commented code, neat structure, etc... But I'm looking for some more "TECHNICAL" tips that might be unspoken. For example, when is a good time to use a variable, opposed to a constant? I notice that a lot of programmers define their database settings with define(), while others just use a $variable. Is this personal preference or maybe its something I'm missing? I'm looking for ALL tips. Any information that you have, please share it. It will help make me (And anyone else reading this), a better coder. Thanks in advance. and if this is not the proper forum, please move it! =]
  12. You know... if you run that script, it should be spitting a bunch of errors at you. Try turning error_reporting on and that should be the key.
  13. Take a look here: http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=YahooDemo&query=test That is a generated XML file from Yahoo's API. If you take a look, it has a node titled "Question". With PHP, how can I loop through each "Question" node and grab all of it's children as well? I tried this code, but apparently it did not work: $req = "http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=YahooDemo&query=php"; $res = file_get_contents($req); $xml = simplexml_load_string($res); foreach ($xml->xpath('//Question') as $question) { // "//question" means for each question node echo((string)$question['Subject']." - ".(string)$question['Content']); // you get all the child nodes in $question }
  14. I'm not understanding... you want the string to read this? $string = "please enter your user name: <input type=text size=50 value='John'>";
  15. Because the $row variable is being created within a conditional statement, it will only be created IF that statement is true. In the case, the $row variable will only be set IF the numbers of rows DOES NOT equal zero. Obviously, the query is returning 0 and not setting your $row variable. <-- Ignore that, I misread. Its because you're referencing the $row variable before the $row variable even exists. The $row variable isn't defined until here: $row = mysql_fetch_assoc($retrieve); After that, assuming that the conditional statement succeeds, you can use it. Otherwise, if a variable has not been set/defined/exists prior to use, PHP will return an error.
×
×
  • 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.