smilesmita Posted March 20, 2008 Share Posted March 20, 2008 I have an array $attribs which looks like this: Array ( [] => [195] => Brand Marketing Practice [185] => Change Management [902] => Clinical Trial Recruitment [196] => Corporate Practice [176] => Corporate Social Responsibility [177] => Entertainment Marketing [172] => Event and Experimental Marketing [197] => Food & Nutrition Practice [198] => Healthcare Practice [183] => Hispanic Marketing [179] => Influencer Marketing [772] => Interactive Communications [174] => Investor Relations [175] => Issues and Crisis Management [182] => Litigation Communications [186] => Lobbying [1] => Media Relations [171] => Media and Spokesperson Training [184] => Public Affairs [2] => Research [4] => Social Marketing [3] => Sports Marketing [199] => Technology Practice [187] => Women’s Marketing [261] => Word-of-Mouth Marketing ) I want to add another element "employee management" with key=185 ..how would i do this with array_push exactly? Link to comment https://forums.phpfreaks.com/topic/97085-array-push/ Share on other sites More sharing options...
Orio Posted March 20, 2008 Share Posted March 20, 2008 You don't have key 185 yet in your array, so you could simply so: $attribs[185] = "..."; Orio. Link to comment https://forums.phpfreaks.com/topic/97085-array-push/#findComment-496773 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.