pragan Posted February 27, 2007 Share Posted February 27, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/40351-hlep-needed-in-writing-custom-scripts-for-a-crm-software/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.