Jump to content

idaachi

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

idaachi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Now, here's a stupid question that any programmer should know. I'm writing a new file where each line should contain the contents of name, age and address. Unfortunately I'm getting spaces between the lines in the newly written line. What should I change??? Who knows some good reading material on this basic stuff? $strNewLine = $strNewLine.$arCurrentLine["firstname"]."\t"; $strNewLine = $strNewLine.$arCurrentLine["lastname"]. "\t"; $strNewLine = $strNewLine.$arCurrentLine["age"]. "\r\n"; fwrite($nFileHandle,$strNewLine); fclose($nFileHandle); Instead of something like Nancy Placebo 19 Daniel Lewis 23 Webber Martin 34 I'm getting something like Nancy Placebo 19 Daniel Lewis 23 Webber Martin 34
  2. I had forgotten to setting all elements in $arPageServers["active"]=false; Still doesn't work. Help please.
  3. I have an array containing a list of server names called $arPageServers I have another array containing variables and keys passed using a form which also reflect server names, this one is called $arActive. These elements in this array have been set by user to active. I.e the checkboxes are clicked in the form. First of all I want to set all the elements in $arPageServers to $arPageServers["active"]= false; then, for each $Aractive as $key => $value, I want to go through the $arPageServers from the beginning to the end and search if the values in $value["name"] gives a match. If match is true, I want to set the corresponding element in $arPageServers to $arPageServers["active"]= true; When this is done I want to write the new file to reflect these changes. This script just doesn't seen to work. Please help pinpointing a better way. Thanks.
  4. I am a beginner. I want to extract the variable below and assign it as $bActive = $_Get["name"]; Something is just not working as $bActive produces an empty array. Please help. Thanks.
  5. How do I include name="" in following echo statement, echo " <td><pre>--".$value["name"]."--</pre</td>\n"; so that I can get these name strings as, $server = $_request["name"]; in the ActiveServer.php file??? Thanks.
×
×
  • 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.