Jump to content

Hlep needed in writing custom scripts for a CRM software


pragan

Recommended Posts

Hi,

 

I need help in the following things:

 

We need to generate a report for the fields from the database. For example,

 

StudentId    Firstname  Lastname      Class

101            abc          def              First year

102            efg          hjk            Third year

103            lmn          rst              First year

 

I need to wrtie a script using php that will change the text under the heading as below

 

StudentId    Firstname  Lastname      Class

101            abc          def              Freshman

102            efg          hjk              Junior

103            lmn          rst              Freshman

 

So basicallly I need to change "First Year" to "Freshman" ,  "Third year" to "Junior" and we will have second year, foruth year also to change to sophomore and senior respectively.

 

I wrote this two lines to change the text with "Freshman" in all the places to just see how custom scripts works in the thrid party software.

 

$class = "Freshman";

$rows[0][3] ->val = $class;  //this is the way I can call that column in this CRM software where I can define my scripts.

 

StudentId    Firstname  Lastname              Class

101            abc                def                  Freshman

102            efg                hjk                  Freshman

103            lmn                rst                  Freshman

 

But I could not figure out the id for the each different value under the column "Class" or how to change each different value under the column "Class".

 

It would be great if any one can help me in knowing the array structure in PHP..I can think of a way that I can write four if else conditions as I will have Four different values for the column " Class".

 

For example :

 

if ($rows[0][3] ->val = "First year"; //(I know I should call it through an id than calling it first year but I am not able  represent it.")

{

    $rows[0][3] ->val = "Freshman"

 

else

  {

....

....

....

  }

}

 

Please help me out.

 

 

Thanks in advance

Pragan

Link to comment
Share on other sites

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.